List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 13 1999 8:36am
Subject:Mysql bug - select encrypt();
View as plain text  
>>>>> "nick" == nick  <nick@stripped> writes:

>> Description:
nick> The inbuilt function "encrypt()" when used in select statements
nick> assumes the output from the library crypt() function will be
nick> 13 characters long and this is wrong. crypt() called with an MD5
nick> format salt will return a much longer string.

>> How-To-Repeat:
mysql> select encrypt("hello", "$1$abc$dddd");
nick> +---------------------------------+
nick> | encrypt("hello", "$1$abc$dddd") |
nick> +---------------------------------+
nick> | $1$abc$jWy0Fs                   |
nick> +---------------------------------+

nick> The correct answer is "$1$abc$jWy0FsfCoVBK.I85XpXf30". See:
nick> perl -e 'print $a=crypt("hello", "\$1\$abc\$dddd"),"\n"'

>> Fix:

Hi!

This is fixed in the MySQL 3.23. releases

Regards,
Monty
Thread
Mysql bug - select encrypt();nick3 Nov
  • Mysql bug - select encrypt();Michael Widenius13 Nov