pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Fujii Masao <fujii@postgresql.org>
Subject: Re: Remove line length restriction in passwordFromFile()
Date: Tue, 1 Sep 2020 10:00:38 +0900
Message-ID: <90aed8c6-a171-4cf7-4e4a-0d4d9593f6c5@oss.nttdata.com> (raw)
In-Reply-To: <4187382.1598909041@sss.pgh.pa.us>
References: <4187382.1598909041@sss.pgh.pa.us>



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 2eb3bc588 (which
> added a warning for overlength lines) seems rather misguided in
> hindsight.  What we should do instead is fix that code so it has no
> hard upper bound on the line length.

AFAIR, there were proposals to increase the maximum length of password so far,
but we could not do that because we failed to get the consensus about
that change. But if we get the clear use-case requiring longer password and
reach the consensus, that's good news. I agree with the change.

> Even if you want to say that
> we'll set a particular limit on how long the password field can be,
> there's no good upper bound for the length of the hostname field;
> so ISTM that just getting out of the business of a fixed-size buffer
> is the sanest way.
> 
> Hence, the attached proposed patch does that, and for good measure
> adds some testing of this formerly untested code.
> 
> Since we now have an actual user complaint, I'm inclined to back-patch
> this all the way.
> 
> As noted in the other thread, there may be some other changes needed
> to support long passwords, but this is clearly required.

Yes, some client tools have 100 bytes length restriction for the password.

Regards,


-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





view thread (3+ messages)  latest in thread

Message-ID: <90aed8c6-a171-4cf7-4e4a-0d4d9593f6c5@oss.nttdata.com>
Permalink:  ../90aed8c6-a171-4cf7-4e4a-0d4d9593f6c5@oss.nttdata.com/
Also on:    postgresql.org/message-id/90aed8c6-a171-4cf7-4e4a-0d4d9593f6c5@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, fujii@postgresql.org
  Subject: Re: Remove line length restriction in passwordFromFile()
  In-Reply-To: <90aed8c6-a171-4cf7-4e4a-0d4d9593f6c5@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox