Re: Modern SHA2- based password hashes for pgcrypto

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bernd Helmle <mailings(at)oopsware(dot)de>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Japin Li <japinli(at)hotmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Modern SHA2- based password hashes for pgcrypto
Date: 2025-04-07 18:16:55
Message-ID: 3601727.1744049815@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Bernd Helmle <mailings(at)oopsware(dot)de> writes:
>> Here is a patch that tries to address all these issues (including
>> Andres' report). I've adjusted the error message and use ereport(), so
>> it might be more useful if we deal with not just single byte letters.

> I'd like to get mamba back to green, so I'll take care of this

And done. FYI, we actually have a standard practice for error
messages that want to complain about a single character without
assuming it's a single-byte character:

ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid character in salt string: \"%.*s\"",
pg_mblen(ep), ep));

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-04-07 18:30:41 Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Previous Message Álvaro Herrera 2025-04-07 18:15:43 Re: Modern SHA2- based password hashes for pgcrypto