Skip to content

Commit 033ffa4

Browse files
authored
it seems this is hash_equals with the s at the end (#2108)
1 parent ff350e9 commit 033ffa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SimpleSAML/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use function call_user_func;
1818
use function defined;
1919
use function get_object_vars;
20-
use function hash_equal;
20+
use function hash_equals;
2121
use function header_register_callback;
2222
use function intval;
2323
use function is_a;
@@ -379,7 +379,7 @@ public static function getSession(string $sessionId = null): ?Session
379379
Logger::warning('Missing AuthToken cookie.');
380380
return null;
381381
}
382-
if (!hash_equal($session->authToken, $_COOKIE[$authTokenCookieName])) {
382+
if (!hash_equals($session->authToken, $_COOKIE[$authTokenCookieName])) {
383383
Logger::warning('Invalid AuthToken cookie.');
384384
return null;
385385
}

0 commit comments

Comments
 (0)