Re: crypt function crash on postgresql 9.3.20 and 10

From: Михаил Манерко <asper(at)tagan(dot)ru>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Pavan Teja <pavan(dot)postgresdba(at)gmail(dot)com>
Cc: Mike Porter <mike(at)udel(dot)edu>, Postgres Bug <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: crypt function crash on postgresql 9.3.20 and 10
Date: 2018-02-02 14:58:34
Message-ID: c8ae1d9d-afb6-4cfc-324b-641be0beb0f1@tagan.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

02.02.2018 17:55, David G. Johnston пишет:
> On Fri, Feb 2, 2018 at 7:50 AM, Pavan Teja <pavan(dot)postgresdba(at)gmail(dot)com <mailto:pavan(dot)postgresdba(at)gmail(dot)com>>wrote:
>
>
>
> On Feb 2, 2018 8:15 PM, "Mike Porter" <mike(at)udel(dot)edu <mailto:mike(at)udel(dot)edu>> wrote:
>
> On Fri, 2 Feb 2018, Михаил Манерко wrote:
>
> If you send an asterisk in the crypt function, the function crashes.
>
>
> example
>
> i=# select crypt('123','*');
> ОШИБКА:  invalid salt
> i=#
>
>
> The second argument is the salt, and you have not passed enough bits
> for the default hash type.
>
> i=> select crypt( '123', 'aa' );
>      crypt
> ---------------
>  aamrgyQfDFSHw
> (1 row)
>
>
>       Hi, 
>               Yeah Mike what u said is correct, the consistency of bits for generation of salt depends on
> algorithms like blow fish, md5 etc
>
>
> ​You sure?  Don't have time to show otherwise but the docs suggest what you are doing is validating a store encrypted
> password as opposed to encrypting the provided one.
>
> David J.
> ​

function takes the text parameter
Should it fall from a 1-character long text?

--
Regards,
Michael A. Manerko

Megalink Company, Engineer
318, Chehova street, Taganrog, Russia, 347932
tel work: +7 8634 431431 (ext 159)
tel mobile: +7 999 6939428
sip: 159(at)tagan(dot)ru
www.tagan.ru

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rainer Pruy 2018-02-02 15:24:47 Re: crypt function crash on postgresql 9.3.20 and 10
Previous Message David G. Johnston 2018-02-02 14:55:10 Re: crypt function crash on postgresql 9.3.20 and 10