From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
Date: Thu, 8 Jun 2017 20:00:26 +0300
Message-ID: <aa64cbe3-9add-a111-9e6e-c9d1a7ead1fa@iki.fi> (raw)
In-Reply-To: <CAB7nPqTCqQH_4jDkJRs2_SBNd_a=nO-J85b9R2c0LLVDpXod_Q@mail.gmail.com>
References: <CAB7nPqQrU1QyagF0i0MVw5_Cxy+YF+kJj5m8X5+qnNawn_UJuQ@mail.gmail.com>
<20170529214021.kaw5qjzsbofaa6re@alvherre.pgsql>
<CAB7nPqTBeEg1TFrZ+8uUWRnKVueDja+_LyTO2esPHRPQQQH8uQ@mail.gmail.com>
<20170602055742.GA1502070@rfd.leadboat.com>
<27186.1496384400@sss.pgh.pa.us>
<20170602063216.GE1500331@rfd.leadboat.com>
<3cc82687-ee65-d0f0-efc2-ddad60ab206f@iki.fi>
<CAB7nPqTCqQH_4jDkJRs2_SBNd_a=nO-J85b9R2c0LLVDpXod_Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 06/08/2017 03:07 AM, Michael Paquier wrote:
> On Wed, Jun 7, 2017 at 11:48 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> On 06/02/2017 09:32 AM, Noah Misch wrote:
>>>> BTW, since you mention COMMERROR uses in auth.c, isn't the usage at
>>>> line 687 wrong? It sure looks like the author supposed that that
>>>> ereport call wouldn't return, but it will. Adjacent similar calls
>>>> clean up and return NULL.
>>>
>>> Probably, though one could argue for proceeding with the short password.
>>> Deserves a comment if log-only is intentional.
>>
>> Let's turn it into an ERROR.
>
> Shouldn't that portion be back-patched?
Yeah, perhaps. But since it's not actively broken, nothing particularly
bad happens with the code as it is, I think I'm not going to bother.
>>> The lack of an exit after COMMERROR "client selected an invalid SASL
>>> authentication mechanism" looks like a bug.
>>
>> Yes. That was fixed in commit 505b5d2f86 already.
>>
>> Taking all the comments in this thread into account, and a few more things
>> that I spotted while looking at the error messages, I came up with the
>> attached patch. It includes the changes from Michael's patch upthread to use
>> errdetail() in the SCRAM errors, and it turns the protocol violation errors
>> in auth.c from COMMERROR into ERROR. See commit message for more details.
>> Barring objections, I'll push this tomorrow.
>
> Thanks for the new version. No additional comments from me.
Ok, committed, thanks!
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnaka@iki.fi, michael.paquier@gmail.com, noah@leadboat.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, daniele.varrazzo@gmail.com
Subject: Re: [PATCH] Fixed malformed error message on malformed SCRAM message.
In-Reply-To: <aa64cbe3-9add-a111-9e6e-c9d1a7ead1fa@iki.fi>
References: <CAB7nPqQrU1QyagF0i0MVw5_Cxy+YF+kJj5m8X5+qnNawn_UJuQ@mail.gmail.com> <20170529214021.kaw5qjzsbofaa6re@alvherre.pgsql> <CAB7nPqTBeEg1TFrZ+8uUWRnKVueDja+_LyTO2esPHRPQQQH8uQ@mail.gmail.com> <20170602055742.GA1502070@rfd.leadboat.com> <27186.1496384400@sss.pgh.pa.us> <20170602063216.GE1500331@rfd.leadboat.com> <3cc82687-ee65-d0f0-efc2-ddad60ab206f@iki.fi> <CAB7nPqTCqQH_4jDkJRs2_SBNd_a=nO-J85b9R2c0LLVDpXod_Q@mail.gmail.com> <aa64cbe3-9add-a111-9e6e-c9d1a7ead1fa@iki.fi>
* 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