#23386 [Opn->Bgs]: 2 Crypt() with different 'salt' - matched!

From: Date: Mon, 28 Apr 2003 21:53:09 +0000
Subject: #23386 [Opn->Bgs]: 2 Crypt() with different 'salt' - matched!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38653@lists.php.net to get a copy of this message
ID: 23386 Updated by: moriyoshi@php.net Reported By: tea at teaconcepts dot net -Status: Open +Status: Bogus Bug Type: *Encryption and hash functions Operating System: Windows and Unix PHP Version: 4.3.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php And just type "man crypt" to see the manpage of crypt(3). Previous Comments: ------------------------------------------------------------------------ [2003-04-28 12:13:03] tea at teaconcepts dot net I was comparing results from 2 crypt() functions with slightly different arguments.. Both of them returned the same results: 1)Here's the script: <? //for the record $code1= crypt('peanut','butter'); //for user input $code2= crypt($a,$b); //display echo "code1: $code1 <br>code2: $code2"; if ($code1 == $code2){ echo "<br>OK"; } ?> 2)Here's the link to the script on my server: //this should result to a match http://teaconcepts.net/test.php?a=peanut&b=butter //this shouldnt result to a match, but did http://teaconcepts.net/test.php?a=peanut&b=butterasdasdaa (or whatever you add after "butter") 3)Here's my php info http://teaconcepts.net/info.php Hope this helps the PHP community! Sincerely Tea J ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23386&edit=1

« previous php.bugs (#38653) next »