mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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 ( 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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user