Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 51135538120 for ; Sat, 28 Jan 2012 12:58:18 -0400 (AST) Received: from oproxy4-pub.bluehost.com ([69.89.21.11]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RrBbR-00015g-AC for pgsql-bugs@postgresql.org; Sat, 28 Jan 2012 16:58:18 +0000 Received: (qmail 31538 invoked by uid 0); 28 Jan 2012 16:58:00 -0000 Received: from unknown (HELO host159.hostmonster.com) (74.220.207.159) by cpoproxy1.bluehost.com with SMTP; 28 Jan 2012 16:58:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=timbira.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=eMQgEoeTjp4of8X8RdRnuXUf5mo3xJrbA2FXB4Zc7sw=; b=IKQr+jqrY+T3Krs6VRN8GWDJM712OpivzykuYBbKb67Mw4CYhE3Z7HESAirqySJFMO7FvCToQ2ZCUR/p6oBEfgSSQHl/Ut/gluSDTJT+Zt6+w6fM2Ugc7qHP7A0lXeB9; Received: from [189.10.73.221] (helo=[10.3.2.6]) by host159.hostmonster.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RrBbC-0006iN-Ri; Sat, 28 Jan 2012 09:58:00 -0700 Message-ID: <4F242892.50403@timbira.com> Date: Sat, 28 Jan 2012 13:55:46 -0300 From: Euler Taveira de Oliveira User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: agrimm@gmail.com, PostgreSQL Bugs Subject: Re: BUG #6412: psql & fe-connect truncate passwords References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Identified-User: {1651:host159.hostmonster.com:timbirac:timbira.com} {sentby:smtp auth 189.10.73.221 authed with euler@timbira.com} X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201201/214 X-Sequence-Number: 32281 On 27-01-2012 23:15, agrimm@gmail.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 http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento