pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: raf@raf.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Possible to store invalid SCRAM-SHA-256 Passwords
Date: Tue, 23 Apr 2019 10:55:28 -0400
Message-ID: <30633.1556031328@sss.pgh.pa.us> (raw)
In-Reply-To: <20190423144159.GP6197@tamriel.snowman.net>
References: <016deb6b-1f0a-8e9f-1833-a8675b170aa9@postgresql.org>
	<4240a41f-a957-fd7d-7c24-31683f259b9d@postgresql.org>
	<20190422015051.GA3433@paquier.xyz>
	<3033.1555940554@sss.pgh.pa.us>
	<20190422135215.GG6197@tamriel.snowman.net>
	<20190422214924.pytigrzlq7mkdyzq@raf.org>
	<20190423144159.GP6197@tamriel.snowman.net>

Stephen Frost <sfrost@snowman.net> writes:
> * raf@raf.org (raf@raf.org) wrote:
>> I don't think there's anything wrong with prefixing a
>> password hash with an identifier for the password
>> hashing scheme (and any parameters for that scheme).
>> This is done all the time in many systems. It just has
>> to be unambiguoous.

> There isn't a way to make it unambiguous given that we accept
> more-or-less anything as a plaintext password though, that would be the
> issue here..

In practice, particularly with the extra validation we just added,
it seems vanishingly unlikely that anyone would choose a password
that just happened to look like one of the hashed formats.

If somebody intentionally chooses such a password, well, it's on
their heads whether the outcome is what they want.

			regards, tom lane





view thread (27+ messages)  latest in thread

Message-ID: <30633.1556031328@sss.pgh.pa.us>
Permalink:  ../30633.1556031328@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30633.1556031328@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, raf@raf.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: Possible to store invalid SCRAM-SHA-256 Passwords
  In-Reply-To: <30633.1556031328@sss.pgh.pa.us>

* 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