Load: load class-phpass.php (PasswordHash class) early in wp-settings.php, instead of require_once()'ing it in several places.
See #36335. Built from https://develop.svn.wordpress.org/trunk@38371 git-svn-id: http://core.svn.wordpress.org/trunk@38312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2095,7 +2095,6 @@ function get_password_reset_key( $user ) {
|
||||
|
||||
// Now insert the key, hashed, into the DB.
|
||||
if ( empty( $wp_hasher ) ) {
|
||||
require_once ABSPATH . WPINC . '/class-phpass.php';
|
||||
$wp_hasher = new PasswordHash( 8, true );
|
||||
}
|
||||
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
||||
@@ -2140,7 +2139,6 @@ function check_password_reset_key($key, $login) {
|
||||
return new WP_Error('invalid_key', __('Invalid key'));
|
||||
|
||||
if ( empty( $wp_hasher ) ) {
|
||||
require_once ABSPATH . WPINC . '/class-phpass.php';
|
||||
$wp_hasher = new PasswordHash( 8, true );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user