Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1r1w-00974a-CX for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 18:17:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u1r1u-002NF4-PS for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 18:17:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u1r1u-002NEv-Fv for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 18:17:06 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u1r1s-003y5O-1y for pgsql-hackers@postgresql.org; Mon, 07 Apr 2025 18:17:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 537IGtFx3601728; Mon, 7 Apr 2025 14:16:55 -0400 From: Tom Lane To: Bernd Helmle cc: Alvaro Herrera , Andres Freund , Japin Li , PostgreSQL Development Subject: Re: Modern SHA2- based password hashes for pgcrypto In-reply-to: <3532284.1744048235@sss.pgh.pa.us> References: <202504051722.3jv3ashzaibd@alvherre.pgsql> <2977905.1743968616@sss.pgh.pa.us> <6fab35422df6b6b9727fdcc243c5fa1c667dd3b5.camel@oopsware.de> <3532284.1744048235@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 07 Apr 2025 13:50:35 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3601726.1744049815.1@sss.pgh.pa.us> Date: Mon, 07 Apr 2025 14:16:55 -0400 Message-ID: <3601727.1744049815@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Bernd Helmle 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