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:
Andrew Nacin 2014-11-20 11:48:11 +00:00
parent 54dff60079
commit cff531489f
1 changed files with 1 additions and 1 deletions

View File

@ -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);