Cannot login from the frontend with pluggable.php error
-
Hi,
Whenever I try to login in the frontend, even with an account created now for testing, it says that the password is wrong and shows this error:
Warning: hash_equals(): Expected known_string to be a string, null given in /web/htdocs/www.dpisekur.com/home/nuovo/wp-includes/pluggable.php on line 2054
I’m using the latest version of WordPress, Betheme and Woocommerce. Could you help me solve this?
referred to this function in pluggable.php:
function wp_check_password($password, $hash, $user_id = ”) {
global $wp_hasher;// If the hash is still md5…
if ( strlen($hash) <= 32 ) {
$check = hash_equals( $hash, md5( $password ) );
if ( $check && $user_id ) {
// Rehash using new hash.
wp_set_password($password, $user_id);
$hash = wp_hash_password($password);
}/**
* Filters whether the plaintext password matches the encrypted password.
*
* @since 2.5.0
*
* @param bool $check Whether the passwords match.
* @param string $password The plaintext password.
* @param string $hash The hashed password.
* @param string|int $user_id User ID. Can be empty.
*/
return apply_filters( ‘check_password’, $check, $password, $hash, $user_id );
}// If the stored hash is longer than an MD5, presume the
// new style phpass portable hash.
if ( empty($wp_hasher) ) {
require_once( ABSPATH . WPINC . ‘/class-phpass.php’);
// By default, use the portable hash from phpass
$wp_hasher = new PasswordHash(8, true);
}$check = $wp_hasher->CheckPassword($password, $hash);
/** This filter is documented in wp-includes/pluggable.php */
return apply_filters( ‘check_password’, $check, $password, $hash, $user_id );
}
The topic ‘Cannot login from the frontend with pluggable.php error’ is closed to new replies.