Use hash_equals() for old md5 hashes.

Merges [30412] to the 3.7 branch.

Built from https://develop.svn.wordpress.org/branches/3.7@30416


git-svn-id: http://core.svn.wordpress.org/branches/3.7@30411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 12:06:10 +00:00
parent a318c79670
commit 7e1c039ed1
1 changed files with 1 additions and 1 deletions

View File

@ -1492,7 +1492,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);