Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6gCW-0001AA-2v for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Nov 2016 16:03:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c6gCV-0004h0-M7 for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Nov 2016 16:03:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6gBr-0003yJ-6V for pgsql-bugs@postgresql.org; Tue, 15 Nov 2016 16:02:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6gBn-0004Oa-MF for pgsql-bugs@postgresql.org; Tue, 15 Nov 2016 16:02:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAFG2LOE025695; Tue, 15 Nov 2016 11:02:22 -0500 From: Tom Lane To: Vik Fearing cc: Josh Berkus , pgsql-bugs Subject: Re: DOS-style line endings in .pgpass In-reply-to: References: <0de37763-5843-b2cc-855e-5d0e5df25807@agliodbs.com> <17d357ef-1a01-2493-a8b0-733010bf4bf0@2ndquadrant.fr> <30513.1479154249@sss.pgh.pa.us> Comments: In-reply-to Vik Fearing message dated "Tue, 15 Nov 2016 02:07:48 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25693.1479225741.1@sss.pgh.pa.us> Date: Tue, 15 Nov 2016 11:02:21 -0500 Message-ID: <25694.1479225741@sss.pgh.pa.us> X-Pg-Spam-Score: -4.7 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Vik Fearing writes: > On 11/14/2016 09:10 PM, Tom Lane wrote: >> Our usual approach to \r characters is that they're whitespace. I wonder >> whether the most friendly solution here is to chomp all trailing >> whitespace. Anybody ever heard of using a trailing space or tab in a >> password? > Trailing, no; but I have a password with a space in the middle. Hm, well, given that we found somebody with an embedded space so easily, maybe trailing spaces are out there too. Also it strikes me that we don't strip whitespace from the other fields in .pgpass, so maybe doing it just for the password isn't so smart. Let's just chomp \n and then \r, and be done. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs