pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael.paquier@gmail.com>
To: Christophe Courtois <christophe.courtois@dalibo.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
Date: Sat, 27 Jan 2018 08:44:28 +0900
Message-ID: <20180126234428.GA1039@paquier.xyz> (raw)
In-Reply-To: <b66c8902-b4ac-1159-ea0a-0be0aaa0b28f@dalibo.com>
References: <b66c8902-b4ac-1159-ea0a-0be0aaa0b28f@dalibo.com>

On Fri, Jan 26, 2018 at 05:22:59PM +0100, Christophe Courtois wrote:
> But it appears as "scram-sha256" (only one hyphen) in pg_hba_file_rules.
> This is a bit confusing.

Thanks for the report.  That's a bug..  Likely from some incorrect
rebase during the feature review. 

> "scram-sha256" appears in commit c727f120 in src/backend/libpq/hba.c,
> while defining the array UserAuthName.
>
> Is it just a remnant of previous versions of the patch or is there a
> reason?

Attached is a patch for that.  At the same time I have noticed that
protocol.sgml is using the same name, so I would suggest to fix that at
the same time.  That introduces a small user-visible change when using
pg_hba_file_rules still that should be backpatched.
--
Michael

Attachments:

scram-hba-fix.patch (text/x-diff, 740B) download diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 4c5ed1e6d6..3cec9e0b0c 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1540,7 +1540,7 @@ On error, the server can abort the authentication at any stage, and send an ErrorMessage. </para> - <sect2 id="sasl-scram-sha256"> + <sect2 id="sasl-scram-sha-256"> <title>SCRAM-SHA-256 authentication</title> <para> diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index aa20f266b8..acf625e4ec 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -126,7 +126,7 @@ static const char *const UserAuthName[] = "ident", "password", "md5", - "scram-sha256", + "scram-sha-256", "gss", "sspi", "pam",
signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)  latest in thread

Message-ID: <20180126234428.GA1039@paquier.xyz>
Permalink:  ../20180126234428.GA1039@paquier.xyz/
Also on:    postgresql.org/message-id/20180126234428.GA1039@paquier.xyz

 ·  · 

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 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: michael.paquier@gmail.com, christophe.courtois@dalibo.com
  Subject: Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
  In-Reply-To: <20180126234428.GA1039@paquier.xyz>
  References: <b66c8902-b4ac-1159-ea0a-0be0aaa0b28f@dalibo.com> <20180126234428.GA1039@paquier.xyz>

* 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