You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Concrete implementation of the RememberMeServicesInterface providing
@@ -53,7 +54,7 @@ protected function processAutoLoginCookie(array $cookieParts, Request $request)
53
54
thrownew \RuntimeException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', get_class($user)));
54
55
}
55
56
56
-
if (true !== $this->compareHashes($hash, $this->generateCookieHash($class, $username, $expires, $user->getPassword()))) {
57
+
if (!StringUtils::equals($this->generateCookieHash($class, $username, $expires, $user->getPassword()), $hash)) {
57
58
thrownewAuthenticationException('The cookie\'s hash is invalid.');
58
59
}
59
60
@@ -64,31 +65,6 @@ protected function processAutoLoginCookie(array $cookieParts, Request $request)
64
65
return$user;
65
66
}
66
67
67
-
/**
68
-
* Compares two hashes using a constant-time algorithm to avoid (remote)
69
-
* timing attacks.
70
-
*
71
-
* This is the same implementation as used in the BasePasswordEncoder.
72
-
*
73
-
* @param string $hash1 The first hash
74
-
* @param string $hash2 The second hash
75
-
*
76
-
* @return bool true if the two hashes are the same, false otherwise
0 commit comments