mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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: http://core.svn.wordpress.org/trunk@23814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d174e5c7ef
commit
b85cb06509
@ -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