From d8856ec4ac13536703dbeb1a186bbc5457ad6dac Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Wed, 19 Aug 2020 07:44:34 +0000 Subject: [PATCH] Fix PHP sessions always throwing an exception. Incorrectly refactored in eb204573214bb2a06d28f824d9b12dd94489d1ce --- lib/SimpleSAML/SessionHandlerPHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SimpleSAML/SessionHandlerPHP.php b/lib/SimpleSAML/SessionHandlerPHP.php index a580e662a..8a960bfab 100644 --- a/lib/SimpleSAML/SessionHandlerPHP.php +++ b/lib/SimpleSAML/SessionHandlerPHP.php @@ -224,7 +224,7 @@ class SessionHandlerPHP extends SessionHandler */ public function loadSession(string $sessionId = null): ?Session { - if ($sessionId !== null) { + if ($sessionId !== session_id()) { throw new Error\Exception('Cannot load PHP session with a specific ID.'); } elseif (session_id() === '') { $this->getCookieSessionId(); -- GitLab