From b1b8c0f95ed9f041f34940445adb340b093da02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Wed, 19 Jun 2019 10:17:18 +0300 Subject: [PATCH] bugfix: Fix instancing NoPassive errors in the IdP The NoPassive constructor requirest the first parameter to be a constant indicating whether the error is due to the requester or the responder. Therefore, passing only an error message is not a valid way to create a NoPassive object anymore. --- lib/SimpleSAML/IdP.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php index a68d95b85..efb26dfab 100644 --- a/lib/SimpleSAML/IdP.php +++ b/lib/SimpleSAML/IdP.php @@ -2,6 +2,8 @@ namespace SimpleSAML; +use SAML2\Constants as SAML2; + use SimpleSAML\Auth; use SimpleSAML\Error; use SimpleSAML\Metadata\MetaDataStorageHandler; @@ -353,7 +355,7 @@ class IdP private function authenticate(array &$state) { if (isset($state['isPassive']) && (bool) $state['isPassive']) { - throw new NoPassive('Passive authentication not supported.'); + throw new NoPassive(SAML2::STATUS_RESPONDER, 'Passive authentication not supported.'); } $this->authSource->login($state); -- GitLab