Re: Non-compliant SASLprep implementation for ASCII characters

Alexander Lakhin <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: John Naylor <johncnaylorls@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-12T13:00:00Z
Lists: pgsql-hackers
12.04.2026 14:47, Michael Paquier wrote:
> On Sun, Apr 12, 2026 at 09:00:00AM +0300, Alexander Lakhin wrote:
>> That is, strlcpy() tries to evaluate strlen() for src, which contains only
>> one byte without null terminator.
> Thanks for the report.  I don't know why skink is not complaining, but
> I do see the failure, and I am able to fix it with the attached.  Does
> it work on your side?

Yes, it works. Thank you for paying attention to the issue!

Maybe it would make sense to find out why skink doesn't detect this (just
in case there are or will be similar defects hiding) before pushing the
fix...

Best regards,
Alexander

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. test_saslprep: Fix issue with copy of input bytea

  2. Make implementation of SASLprep compliant for ASCII characters

  3. test_saslprep: Test module for SASLprep()