From cff531489fe331bb0cf09b0ea894398df9dac060 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Nov 2014 11:48:11 +0000 Subject: [PATCH] Use hash_equals() for old md5 hashes. git-svn-id: https://develop.svn.wordpress.org/trunk@30412 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index e3a33e735f..76cdb33d45 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -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);