diff --git a/modules/core/www/idp/resumeauth.php b/modules/core/www/idp/resumeauth.php index 5bf4a394e556f0a813cf310667250ef78b291974..ba2803e4e0dab07ddaea3b6affcfb561c6ad9dc0 100644 --- a/modules/core/www/idp/resumeauth.php +++ b/modules/core/www/idp/resumeauth.php @@ -1,15 +1,14 @@ <?php -if (isset($_REQUEST['RequestID'])) { - /* Backwards-compatibility with old authentication pages. */ - $session = SimpleSAML_Session::getInstance(); - $requestcache = $session->getAuthnRequest('saml2', (string)$_REQUEST['RequestID']); - if (!$requestcache) { - throw new Exception('Could not retrieve cached RequestID = ' . $authId); - } - $state = $requestcache['State']; - SimpleSAML_IdP::postAuth($state); - -} else { +if (!isset($_REQUEST['RequestID'])) { throw new SimpleSAML_Error_BadRequest('Missing required URL parameter.'); } + +/* Backwards-compatibility with old authentication pages. */ +$session = SimpleSAML_Session::getInstance(); +$requestcache = $session->getAuthnRequest('saml2', (string)$_REQUEST['RequestID']); +if (!$requestcache) { + throw new Exception('Could not retrieve cached RequestID = ' . $authId); +} +$state = $requestcache['State']; +SimpleSAML_IdP::postAuth($state);