From ddb3ee5057c06d661cc9156929ad40c6b70e3ad3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Nov 2014 11:49:23 +0000 Subject: [PATCH] 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 --- wp-includes/pluggable.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index e3a33e735f..76cdb33d45 100644 --- a/wp-includes/pluggable.php +++ b/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); diff --git a/wp-includes/version.php b/wp-includes/version.php index db59251cdd..56552b730c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.