Re: ProcessStartupPacket(): database_name and user_name truncation - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: ProcessStartupPacket(): database_name and user_name truncation
Date
Msg-id 20230703.105045.1268007612485709897.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: ProcessStartupPacket(): database_name and user_name truncation  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
At Fri, 30 Jun 2023 19:32:50 +0200, "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com> wrote in 
> Hi,
> 
> On 6/30/23 5:54 PM, Tom Lane wrote:
> > Nathan Bossart <nathandbossart@gmail.com> writes:
> >> After taking another look at this, I wonder if it'd be better to fail
> >> as
> >> soon as we see the database or user name is too long instead of
> >> lugging
> >> them around when authentication is destined to fail.

For the record, if I understand Nathan correctly, it is what I
suggested in my initial post. If this is correct, +1 for the suggestion.

me> I think we might want to consider outright rejecting the
me> estblishment of a connection when the given database name doesn't
me> fit the startup packet

> > If we're agreed that we aren't going to truncate these identifiers,
> > that seems like a reasonable way to handle it.
> > 
> 
> Yeah agree, thanks Nathan for the idea.
> I'll work on a new patch version proposal.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: check_strxfrm_bug()
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: ProcessStartupPacket(): database_name and user_name truncation