Skip to content
Snippets Groups Projects
Commit 5ee2e408 authored by Olav Morken's avatar Olav Morken
Browse files

Handle missing SP metadata in iframe logout.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1737 44740490-163a-0410-bde0-09ae8108e29a
parent 372062ec
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,17 @@ function updateslostatus() {
// add a command to the response to assign the innerHTML attribute of
// the element with id="SomeElementId" to whatever the new content is
$spmetadata = $metadata->getMetaData($spentityid, 'saml20-sp-remote');
try {
$spmetadata = $metadata->getMetaData($spentityid, 'saml20-sp-remote');
} catch (Exception $e) {
/*
* For some reason, the metadata for this SP is no longer available. Most
* likely it was deleted from the IdP while the user had a session to it.
* In any case - skip this SP.
*/
continue;
}
$name = array_key_exists('name', $spmetadata) ? $spmetadata['name'] : $spentityid;
$spname = is_array($name) ? $t->getTranslation($name) : $name;
......@@ -265,7 +275,17 @@ foreach ($listofsps AS $spentityid) {
$nameId = $session->getNameID();
}
$spMetadata = $metadata->getMetaDataConfig($spentityid, 'saml20-sp-remote');
try {
$spMetadata = $metadata->getMetaDataConfig($spentityid, 'saml20-sp-remote');
} catch (Exception $e) {
/*
* For some reason, the metadata for this SP is no longer available. Most
* likely it was deleted from the IdP while the user had a session to it.
* In any case - skip this SP.
*/
continue;
}
$name = $spMetadata->getValue('name', $spentityid);
try {
......
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