Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ehd6f-0005ZU-4F for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Feb 2018 15:18:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehd6d-0002gB-UL for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Feb 2018 15:18:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ehcnZ-0006qo-J7 for pgsql-bugs@lists.postgresql.org; Fri, 02 Feb 2018 14:58:41 +0000 Received: from mail.tagan.ru ([95.174.96.5]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ehcnV-00049R-8u for pgsql-bugs@postgresql.org; Fri, 02 Feb 2018 14:58:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tagan.ru; s=dkim; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Sender:Reply-To:Content-Transfer-Encoding:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=1slIxxPTTrp6TH5fHm/R3rTAHuV8+KK5nlth4yzDbA8=; b=GpAa2zy6NQ5M0dNHetQLf8UqN8 CfTLZ/zrNy4XXRvSHh6mCthah7CS1HgMoOuCMRF1ivn3WsZg1g3pWhyKt6tAzdBBRX77SJl9Xfy49 A6nfmzGe7duDUSwEeXxDs02q6yuoRYAXX6GR1M0H0rwR3dTQPdRsgIPUEP6YQ38gzzKw=; Received: from mgl.tagan.ru ([95.174.99.3] helo=[10.55.48.201]) by mail.tagan.ru with esmtpsa auth=asper (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1ehcnR-0004mJ-TX; Fri, 02 Feb 2018 17:58:33 +0300 Subject: Re: crypt function crash on postgresql 9.3.20 and 10 To: "David G. Johnston" , Pavan Teja Cc: Mike Porter , Postgres Bug References: <5059192d-2ff7-41c2-1070-708cb65f33e9@tagan.ru> From: =?UTF-8?B?0JzQuNGF0LDQuNC7INCc0LDQvdC10YDQutC+?= Message-ID: Date: Fri, 2 Feb 2018 17:58:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------D6A2665EA67BC88A85A26F2D" Content-Language: ru-RU List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------D6A2665EA67BC88A85A26F2D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 02.02.2018 17:55, David G. Johnston пишет: > On Fri, Feb 2, 2018 at 7:50 AM, Pavan Teja >wrote: > > > > On Feb 2, 2018 8:15 PM, "Mike Porter" > 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@tagan.ru www.tagan.ru --------------D6A2665EA67BC88A85A26F2D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
02.02.2018 17:55, David G. Johnston пишет:
On Fri, Feb 2, 2018 at 7:50 AM, Pavan Teja <pavan.postgresdba@gmail.com> wrote:


On Feb 2, 2018 8:15 PM, "Mike Porter" <mike@udel.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@tagan.ru
www.tagan.ru
--------------D6A2665EA67BC88A85A26F2D--