Re: crypt function crash on postgresql 9.3.20 and 10 - Mailing list pgsql-bugs

From Francisco Olarte
Subject Re: crypt function crash on postgresql 9.3.20 and 10
Date
Msg-id CA+bJJby0xv3vNAGKEV2VdBm9c2V899u+1tbdO+MUba_GrPLOyw@mail.gmail.com
Whole thread Raw
In response to crypt function crash on postgresql 9.3.20 and 10  (Михаил Манерко <asper@tagan.ru>)
Responses Re: crypt function crash on postgresql 9.3.20 and 10  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Seems more like pilot error than a bug....

On Fri, Feb 2, 2018 at 2:11 PM, Михаил Манерко <asper@tagan.ru> wrote:
> If you send an asterisk in the crypt function, the function crashes.
> example
>
> i=# select crypt('123','*');
> ОШИБКА:  invalid salt
> i=#

Id does not crash, it just rejects your salt as invalid, probably
because it is ( does not look right to me, but I'm not in the mood for
fully checking that ).

TFM states 'Calculates a crypt(3)-style hash of password. When storing
a new password, you need to use gen_salt() to generate a new salt
value. To check a password, pass the stored hash value as salt, and
test whether the result matches the stored value.'

Are you doing that ?

Francisco Olarte.


pgsql-bugs by date:

Previous
From: Михаил Манерко
Date:
Subject: crypt function crash on postgresql 9.3.20 and 10
Next
From: Mike Porter
Date:
Subject: Re: crypt function crash on postgresql 9.3.20 and 10