Skip to content

Commit

Permalink
changed the redirect to httpUtils->redirectTrustedURL as requested by @…
Browse files Browse the repository at this point in the history
  • Loading branch information
doedje authored and thijskh committed Mar 19, 2024
1 parent 6f33dc7 commit c81b0c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controller/SFO.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use SimpleSAML\Metadata\MetaDataStorageHandler;
use SimpleSAML\Module;
use SimpleSAML\Module\saml\Message;
use SimpleSAML\Utils;
use SimpleSAML\XHTML\Template;

use function sprintf;
Expand Down Expand Up @@ -117,8 +118,8 @@ public function acs(): Template
$e->getSubStatus() == 'urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext') {
Logger::debug('SFO - token of demanded LOA is not available, redirecting to selfserviceUrl.');

header('Location: '. $selfserviceUrl);
exit();
$httpUtils = new Utils\HTTP();
return $httpUtils->redirectTrustedURL($selfserviceUrl);

} else {
Logger::debug('SFO - status response received, showing error page.');
Expand Down

0 comments on commit c81b0c8

Please sign in to comment.