Skip to content
Snippets Groups Projects
Commit f429c457 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Merge branch 'Issue648'

parents 4e68df80 0eea5c8b
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,20 @@ if ($prevAuth !== null && $prevAuth['id'] === $response->getId() && $prevAuth['i
$idpMetadata = array();
$state = null;
$stateId = $response->getInResponseTo();
if (!empty($stateId)) {
// this is a response to a request we sent earlier
$state = SimpleSAML_Auth_State::loadState($stateId, 'saml:sp:sso');
// this should be a response to a request we sent earlier
try {
$state = SimpleSAML_Auth_State::loadState($stateId, 'saml:sp:sso');
} catch (Exception $e) {
// something went wrong,
SimpleSAML_Logger::warning('Could not load state specified by InResponseTo: '.$e->getMessage().
' Processing response as unsolicited.');
}
}
if ($state) {
// check that the authentication source is correct
assert('array_key_exists("saml:sp:AuthId", $state)');
if ($state['saml:sp:AuthId'] !== $sourceId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment