Re: crypt function crash on postgresql 9.3.20 and 10

From: Pavan Teja <pavan(dot)postgresdba(at)gmail(dot)com>
To: Mike Porter <mike(at)udel(dot)edu>
Cc: Михаил Манерко <asper(at)tagan(dot)ru>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: crypt function crash on postgresql 9.3.20 and 10
Date: 2018-02-02 14:50:34
Message-ID: CACh9nsbCQzqt4ZJ7wsau-zS8eeHK+kDdGJQBwN-u3Cvvu6F20Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Feb 2, 2018 8:15 PM, "Mike Porter" <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)

i=> select crypt( '123', 'a' );
ERROR: invalid salt

Regards,

Mike

> --
> 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
>
>
>
>
-
Mike Porter
PGP Fingerprint: 139B 5431 9346 A577 C0F8 6C76 635D 6C9D 5ABB D433
Old Key: F4 AE E1 9F 67 F7 DA EA 2F D2 37 F3 99 ED D1 C2

Hi,
Yeah Mike what u said is correct, the consistency of bits for
generation of salt depends on algorithms like blow fish, md5 etc

Regards,
Pavan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-02-02 14:51:07 Re: crypt function crash on postgresql 9.3.20 and 10
Previous Message Mike Porter 2018-02-02 14:44:52 Re: crypt function crash on postgresql 9.3.20 and 10