Use hash_equals() for old md5 hashes.

Built from https://develop.svn.wordpress.org/trunk@30412


git-svn-id: http://core.svn.wordpress.org/trunk@30407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-11-20 11:49:23 +00:00
parent 871176e42b
commit ddb3ee5057
2 changed files with 2 additions and 2 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);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta1-30411';
$wp_version = '4.1-beta1-30412';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.