From de2eca388d217585f41f540bc70e98aa9a882979 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Wed, 28 Aug 2019 20:40:14 +0200 Subject: [PATCH] Fix type confusion --- modules/saml/www/sp/saml2-acs.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/saml/www/sp/saml2-acs.php b/modules/saml/www/sp/saml2-acs.php index c2ec998ff..23a4de7da 100644 --- a/modules/saml/www/sp/saml2-acs.php +++ b/modules/saml/www/sp/saml2-acs.php @@ -82,10 +82,10 @@ if ($prevAuth !== null && $prevAuth['id'] === $response->getId() && $prevAuth['i throw new \SimpleSAML\Error\Exception('Duplicate assertion received.'); } -$idpMetadata = []; - +$idpMetadata = null; $state = null; $stateId = $response->getInResponseTo(); + if (!empty($stateId)) { // this should be a response to a request we sent earlier try { @@ -131,7 +131,7 @@ if ($state) { SimpleSAML\Logger::debug('Received SAML2 Response from '.var_export($issuer, true).'.'); -if (empty($idpMetadata)) { +if (is_null($idpMetadata)) { $idpMetadata = $source->getIdPmetadata($issuer); } -- GitLab