Pluggable Auth: When setting new passwords for users trim any leading or trailing space to match what we do when we test passwords.
Fixes #23494 git-svn-id: https://develop.svn.wordpress.org/trunk@23814 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
348f0f4fd5
commit
d160c66498
@ -1565,7 +1565,7 @@ if ( !function_exists('wp_set_password') ) :
|
||||
function wp_set_password( $password, $user_id ) {
|
||||
global $wpdb;
|
||||
|
||||
$hash = wp_hash_password($password);
|
||||
$hash = wp_hash_password( trim( $password ) );
|
||||
$wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
|
||||
|
||||
wp_cache_delete($user_id, 'users');
|
||||
|
Loading…
x
Reference in New Issue
Block a user