diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index a5dfd53496..d75908261e 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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');