Re: Modern SHA2- based password hashes for pgcrypto

Поиск
Список
Период
Сортировка
От Bernd Helmle
Тема Re: Modern SHA2- based password hashes for pgcrypto
Дата
Msg-id 6fab35422df6b6b9727fdcc243c5fa1c667dd3b5.camel@oopsware.de
обсуждение исходный текст
Ответ на Re: Modern SHA2- based password hashes for pgcrypto  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Modern SHA2- based password hashes for pgcrypto
Список pgsql-hackers
Am Sonntag, dem 06.04.2025 um 15:43 -0400 schrieb Tom Lane:
> I'd be more comfortable with a check like
>
>     if (strchr("...valid chars...", *ep) != NULL)
>
> It looks like "_crypt_itoa64" might be directly usable as the
> valid-chars string, too.  (BTW, why is _crypt_itoa64 not
> marked const?)

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've also changed _crypt_itoa64 from unsigned char to char, since this
seems what strchr() expects (at least on my machine) and we don't deal
specifically elsewhere with that.


Thanks,
    Bernd


Вложения

В списке pgsql-hackers по дате отправления: