mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 22:24:36 +00:00
Move the trim() from wp_set_password() to inside wp_hash_password().
props rpattillo, joehoyle. fixes #24973. see #23494. git-svn-id: https://develop.svn.wordpress.org/trunk@25709 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1456,7 +1456,7 @@ function wp_hash_password($password) {
|
||||
$wp_hasher = new PasswordHash(8, true);
|
||||
}
|
||||
|
||||
return $wp_hasher->HashPassword($password);
|
||||
return $wp_hasher->HashPassword( trim( $password ) );
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -1603,7 +1603,7 @@ if ( !function_exists('wp_set_password') ) :
|
||||
function wp_set_password( $password, $user_id ) {
|
||||
global $wpdb;
|
||||
|
||||
$hash = wp_hash_password( trim( $password ) );
|
||||
$hash = wp_hash_password( $password );
|
||||
$wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
|
||||
|
||||
wp_cache_delete($user_id, 'users');
|
||||
|
||||
Reference in New Issue
Block a user