Skip to content

Commit adbd8da

Browse files
authored
Merge pull request #2109 from monkeyiq/2024/may/update-hash_equals
it seems this is hash_equals with the s at the end
2 parents 5066253 + 111bde0 commit adbd8da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/SimpleSAML/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use SimpleSAML\Error;
1111
use SimpleSAML\Utils;
1212

13-
use function hash_equal;
13+
use function hash_equals;
1414

1515
/**
1616
* The Session class holds information about a user session, and everything attached to it.
@@ -362,7 +362,7 @@ public static function getSession(string $sessionId = null): ?Session
362362
Logger::warning('Missing AuthToken cookie.');
363363
return null;
364364
}
365-
if (!hash_equal($session->authToken, $_COOKIE[$authTokenCookieName])) {
365+
if (!hash_equals($session->authToken, $_COOKIE[$authTokenCookieName])) {
366366
Logger::warning('Invalid AuthToken cookie.');
367367
return null;
368368
}

0 commit comments

Comments
 (0)