Re: DOS-style line endings in .pgpass

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vik Fearing <vik(at)2ndquadrant(dot)fr>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: DOS-style line endings in .pgpass
Date: 2016-11-15 16:02:21
Message-ID: 25694.1479225741@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Vik Fearing <vik(at)2ndquadrant(dot)fr> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message privat 2016-11-16 06:59:33 BUG #14425: Installation issues
Previous Message Mikael Wallén 2016-11-15 07:45:17 Re: BUG #14423: Fail to connect to DB