Use hash_equals() for old md5 hashes.
git-svn-id: https://develop.svn.wordpress.org/trunk@30412 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54dff60079
commit
cff531489f
@ -1935,7 +1935,7 @@ function wp_check_password($password, $hash, $user_id = '') {
|
||||
|
||||
// If the hash is still md5...
|
||||
if ( strlen($hash) <= 32 ) {
|
||||
$check = ( $hash == md5($password) );
|
||||
$check = hash_equals( $hash, md5( $password ) );
|
||||
if ( $check && $user_id ) {
|
||||
// Rehash using new hash.
|
||||
wp_set_password($password, $user_id);
|
||||
|
Loading…
Reference in New Issue
Block a user