Re: DOS-style line endings in .pgpass

Поиск
Список
Период
Сортировка
От John McKown
Тема Re: DOS-style line endings in .pgpass
Дата
Msg-id CAAJSdjhtocaJ=53H5==MQ5_bbcrK9yuk0842LPZA990GZMKe+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: DOS-style line endings in .pgpass  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, Nov 14, 2016 at 2:10 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Vik Fearing <vik@2ndquadrant.fr> writes:
> > On 11/14/2016 08:31 PM, Josh Berkus wrote:
> >> What appears to be happening here is that one of the characters of the
> >> CRLF is being appended to the password, making it invalid.
>
> > Maybe something like the attached patch?
>
> 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?
>
>         while (len > 0 && strchr(" \t\r\n", buf[len - 1]) !=3D NULL)
>                 buf[--len] =3D '\0';
>
>                         regards, tom lane


=E2=80=8BFWIW, I think that's a really good idea. I, personally, don't like
non-printable characters in passwords. They are harder than <elided> to
enter on the keyboard.=E2=80=8B


>
>


--=20
Heisenberg may have been here.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DOS-style line endings in .pgpass
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: DOS-style line endings in .pgpass