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:
parent
871176e42b
commit
ddb3ee5057
|
@ -1935,7 +1935,7 @@ function wp_check_password($password, $hash, $user_id = '') {
|
||||||
|
|
||||||
// If the hash is still md5...
|
// If the hash is still md5...
|
||||||
if ( strlen($hash) <= 32 ) {
|
if ( strlen($hash) <= 32 ) {
|
||||||
$check = ( $hash == md5($password) );
|
$check = hash_equals( $hash, md5( $password ) );
|
||||||
if ( $check && $user_id ) {
|
if ( $check && $user_id ) {
|
||||||
// Rehash using new hash.
|
// Rehash using new hash.
|
||||||
wp_set_password($password, $user_id);
|
wp_set_password($password, $user_id);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue