Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Tom Lane
Fujii Masao writes: > On 2020/09/10 2:16, Tom Lane wrote: >> Hm, in a quick search I only see 2eb3bc588 which was not back-patched >> ... which commits are you thinking of? > I thought your commit b55b4dad99 included the improvement on comment > detection and was back-patched Oh, right, I d

Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Fujii Masao
On 2020/09/10 2:16, Tom Lane wrote: Fujii Masao writes: On 2020/09/10 1:48, Tom Lane wrote: We could adjust the release-note entry for your patch to say "Improve comment detection for .pgpass files", or we could decide it's not worth documenting that part and just drop the entry. "Improv

Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Tom Lane
Fujii Masao writes: > On 2020/09/10 1:48, Tom Lane wrote: >> We could adjust the release-note entry for your patch to say >> "Improve comment detection for .pgpass files", or we could decide >> it's not worth documenting that part and just drop the entry. > "Improve comment detection for .pgpass

Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Fujii Masao
On 2020/09/10 1:48, Tom Lane wrote: Fujii Masao writes: The patch was back-patched to v13, but v13 release note still has the following item. Tighten libpq's overlength-line handling and comment detection for .pgpass files (Fujii Masao) This should be changed to the following o

Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Tom Lane
Fujii Masao writes: > The patch was back-patched to v13, but v13 release note still has the > following item. > Tighten libpq's overlength-line handling and comment detection for > .pgpass files (Fujii Masao) > This should be changed to the following or something? > Teach libpq to h

Re: Remove line length restriction in passwordFromFile()

2020-09-09 Thread Fujii Masao
On 2020/09/02 0:14, Tom Lane wrote: Fujii Masao writes: The patch looks good to me, except the following minor thing. + if (fgets(buf.data + buf.len, buf.maxlen - buf.len - 1, fp) == NULL) IIUC fgets() reads the data with the specified size - 1, so ISTM that -1 of "buf.maxlen

Re: Remove line length restriction in passwordFromFile()

2020-09-01 Thread Tom Lane
Fujii Masao writes: > The patch looks good to me, except the following minor thing. > + if (fgets(buf.data + buf.len, buf.maxlen - buf.len - 1, fp) == > NULL) > IIUC fgets() reads the data with the specified size - 1, so ISTM that -1 of > "buf.maxlen - buf.len - 1" is not necessary.

Re: Remove line length restriction in passwordFromFile()

2020-08-31 Thread Fujii Masao
On 2020/09/01 10:00, Fujii Masao wrote: On 2020/09/01 6:24, Tom Lane wrote: Per the discussion at [1], we're now aware of actual use-cases for password strings approaching a kilobyte in length.  I think this puts the final nail in the coffin of the idea that passwordFromFile() can use a fix

Re: Remove line length restriction in passwordFromFile()

2020-08-31 Thread Fujii Masao
On 2020/09/01 6:24, Tom Lane wrote: Per the discussion at [1], we're now aware of actual use-cases for password strings approaching a kilobyte in length. I think this puts the final nail in the coffin of the idea that passwordFromFile() can use a fixed-length line buffer. Therefore, commit 2