Edit report at https://bugs.php.net/bug.php?id=64268&edit=1

 ID:                 64268
 User updated by:    sarciszewski at knights dot ucf dot edu
 Reported by:        sarciszewski at knights dot ucf dot edu
 Summary:            crypt() outputting *0 for unknown reason
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            *Encryption and hash functions
 Operating System:   Ubuntu 12.04 kernel 3.2.0
 PHP Version:        5.4.11
 Block user comment: N
 Private report:     N

 New Comment:

After all that concern of an unknown buffer overflow or disallowed character, I 
forgot to end the salt with a $ character :(


Previous Comments:
------------------------------------------------------------------------
[2013-02-21 18:19:13] sarciszewski at knights dot ucf dot edu

Description:
------------
crypt() seems to be breaking for some reason with this password and salt 
combination

I've not read anything about limitations on the characters supplied to crypt() 
in the PHP documentation

Test script:
---------------
<?
$plain = 
"W9no`y_vr.!b<W'.Wp44NU~\"Vf}n{G077<^UnqFyWwKyaz1YuyrO9H+1/T8J3Ha_C|X=gU^?EBrc2";
$salt = '$2a$10$CqenGirJlEl6sCA2/w2ay';

echo crypt($pre, $salt);
?>

Expected result:
----------------
$2a$10$CqenGirJlEl6sCA2/w2a (followed by hashed data)

Actual result:
--------------
*0


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64268&edit=1

Reply via email to