SF Bug #2958613 - password_checker.php md5crypt explode() function bug
This commit is contained in:
parent
c3a286cfee
commit
6fdab2c308
@ -2293,7 +2293,7 @@ function password_check($cryptedpassword,$plainpassword) {
|
|||||||
if (! defined('CRYPT_MD5') || CRYPT_MD5 == 0)
|
if (! defined('CRYPT_MD5') || CRYPT_MD5 == 0)
|
||||||
error(_('Your system crypt library does not support md5crypt encryption.'),'error','index.php');
|
error(_('Your system crypt library does not support md5crypt encryption.'),'error','index.php');
|
||||||
|
|
||||||
list($type,$salt,$hash) = explode('$',$cryptedpassword);
|
list($dummy,$type,$salt,$hash) = explode('$',$cryptedpassword);
|
||||||
|
|
||||||
if (crypt($plainpassword,'$1$'.$salt) == $cryptedpassword)
|
if (crypt($plainpassword,'$1$'.$salt) == $cryptedpassword)
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user