Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 3a32f2b

Browse files
committed
Fixed the bug from a425b6c
1 parent 76aa83e commit 3a32f2b

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

lib/Disco.php

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,23 @@ public function __construct(array $metadataSets, $instance)
3333
$returnURL = \SimpleSAML\Utils\HTTP::checkURLAllowed($_GET['return']);
3434
}
3535

36-
if (isset($returnURL['query'])) {
37-
parse_str(parse_url($returnURL)['query'], $query);
36+
parse_str(parse_url($returnURL)['query'], $query);
3837

39-
if (isset($query['AuthID'])) {
40-
$id = explode(":", $query['AuthID'])[0];
41-
$state = SimpleSAML_Auth_State::loadState($id, 'saml:sp:sso', true);
38+
if (isset($query['AuthID'])) {
39+
$id = explode(":", $query['AuthID'])[0];
40+
$state = SimpleSAML_Auth_State::loadState($id, 'saml:sp:sso', true);
4241

43-
if (! is_null($state)) {
44-
if (isset($state['saml:RequestedAuthnContext']['AuthnContextClassRef'])) {
45-
$this->authnContextClassRef = $state['saml:RequestedAuthnContext']['AuthnContextClassRef'];
46-
$this->removeAuthContextClassRefWithPrefix($state);
47-
}
42+
if (! is_null($state)) {
43+
if (isset($state['saml:RequestedAuthnContext']['AuthnContextClassRef'])) {
44+
$this->authnContextClassRef = $state['saml:RequestedAuthnContext']['AuthnContextClassRef'];
45+
$this->removeAuthContextClassRefWithPrefix($state);
46+
}
4847

49-
$id = SimpleSAML_Auth_State::saveState($state, 'saml:sp:sso');
48+
$id = SimpleSAML_Auth_State::saveState($state, 'saml:sp:sso');
5049

51-
$e = explode("=", $returnURL)[0];
52-
$newReturnURL = $e . "=" . urlencode($id);
53-
$_GET['return'] = $newReturnURL;
54-
}
50+
$e = explode("=", $returnURL)[0];
51+
$newReturnURL = $e . "=" . urlencode($id);
52+
$_GET['return'] = $newReturnURL;
5553
}
5654
}
5755

0 commit comments

Comments
 (0)