Skip to content

Commit

Permalink
Use hash_equals() for old md5 hashes.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nacin committed Nov 20, 2014
1 parent a318c79 commit 7e1c039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e1c039

Please sign in to comment.