Skip site navigation (1) Skip section navigation (2)

Re: BUG #6412: psql & fe-connect truncate passwords

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: agrimm(at)gmail(dot)com, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6412: psql & fe-connect truncate passwords
Date: 2012-01-28 16:55:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On 27-01-2012 23:15, agrimm(at)gmail(dot)com wrote:
> When psql prompts for a password, it only reads the first 100 characters of
> the password.  The limit in fe-connect.c (for when .pgpass is used) is
> weirder, a seemingly arbitrary 320 bytes for all fields combined.  Other
> (postgresql-jdbc, PyGreSQL, etc.) have no problem with a 512-byte password. 
> It would be nice to have these limits controlled by a constant, and for the
> command to give an error or warning when a password is truncated.
I don't see it as a bug but a limitation. Why do you need such a long
password? If you are not comfortable with this reasonable limit, look at
fe-connect.c -> PasswordFromFile() and change the LINELEN. More to the point,
AFAICS all of the PostgreSQL client prompts are limited to 100 bytes (look at
simple_prompt function); letting 220 bytes for host, port, database, and user.

   Euler Taveira de Oliveira - Timbira
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to


pgsql-bugs by date

Next:From: Andy GrimmDate: 2012-01-28 17:32:24
Subject: Re: BUG #6412: psql & fe-connect truncate passwords
Previous:From: jamesDate: 2012-01-28 16:16:47
Subject: BUG #6413: pg_relation_size wont work on table with upper case chars

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group