From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Andy Grimm <agrimm@gmail.com>
Cc: Euler Taveira de Oliveira <euler@timbira.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6412: psql & fe-connect truncate passwords
Date: Thu, 20 Sep 2012 10:18:08 +0300
Message-ID: <505AC330.7010102@vmware.com> (raw)
In-Reply-To: <CAEoAmOo15gyix-MTycc_gPTaYTVL7jPArOpKCn4S0rdT4ivPgw@mail.gmail.com>
References: <E1Rqxp2-0004Qt-PL@wrigleys.postgresql.org>
<4F242892.50403@timbira.com>
<CAEoAmOqnmJnZ5SPGM1Y1gWeO6_R7z8-u97vUMynrD3BMKMT1aA@mail.gmail.com>
<4F24437F.7080306@timbira.com>
<CAEoAmOqZd6Ey6Egx3n_BMOzhHxdvWO2rE=6Z9zkt+U3D9kvgbA@mail.gmail.com>
<4F24972F.6080904@timbira.com>
<CAEoAmOo15gyix-MTycc_gPTaYTVL7jPArOpKCn4S0rdT4ivPgw@mail.gmail.com>
On 15.02.2012 07:09, Andy Grimm wrote:
> Sorry that it's been a couple of weeks, but I have gotten around to
> working on a patch that address more of these concerns. The attached
> patch should
>
> 1) allow arbitrary length passwords to be read from a file via initdb --pwfile
> 2) allow the client to accept a password of arbitrary length at the
> password prompt
> 3) allow a password of arbitrary length in a pgpass file
>
> In #2 I say "allow the client to accept", because there's a
> pq_getmessage call in src/backend/libpq/auth.c which limits the
> password message length to 1000 characters. Changing that part of the
> code should allow longer passwords, but there may be other lurking
> backend issues after that, and I'm not concerned about going beyond
> 1000 at this point.
Thanks for the patch. A few comments:
* Most of the simple_prompt() calls are for passwords, which now have no
limit, but there's a few others. How about we remove the maxlen argument
altogether, and just have it always return a malloc'd string that can be
arbitrarily long. (maybe with a sanity-check limit within
simple_prompt(), like 100k)
* .pg_service.conf handling still has a fixed limit on line length of
256 bytes. See parseServiceInfo() in fe-connect. I think we should lift
that limit too, for the sake of consistency. You can pass a password in
the service file, too.
* Missed a few simple_prompt() calls in contrib (oid2name, vacuumlo,
pgbench)
- Heikki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnakangas@vmware.com, agrimm@gmail.com, euler@timbira.com
Subject: Re: BUG #6412: psql & fe-connect truncate passwords
In-Reply-To: <505AC330.7010102@vmware.com>
References: <E1Rqxp2-0004Qt-PL@wrigleys.postgresql.org> <4F242892.50403@timbira.com> <CAEoAmOqnmJnZ5SPGM1Y1gWeO6_R7z8-u97vUMynrD3BMKMT1aA@mail.gmail.com> <4F24437F.7080306@timbira.com> <CAEoAmOqZd6Ey6Egx3n_BMOzhHxdvWO2rE=6Z9zkt+U3D9kvgbA@mail.gmail.com> <4F24972F.6080904@timbira.com> <CAEoAmOo15gyix-MTycc_gPTaYTVL7jPArOpKCn4S0rdT4ivPgw@mail.gmail.com> <505AC330.7010102@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox