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

Dynamic metadata - remove fallback for entity selection when no entity with...

Dynamic metadata - remove fallback for entity selection when no entity with correct entity id is found in downloaded metadata.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@870 44740490-163a-0410-bde0-09ae8108e29a
parent 631cb720
No related branches found
No related tags found
No related merge requests found
...@@ -239,27 +239,15 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerDynamicXML extends SimpleSAML_Me ...@@ -239,27 +239,15 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerDynamicXML extends SimpleSAML_Me
throw new Exception('No entities found in "' . $index . '".'); throw new Exception('No entities found in "' . $index . '".');
} }
if (array_key_exists($index, $entities)) { if (!array_key_exists($index, $entities)) {
$entity = $entities[$index]; throw new Exception ('No entity with correct entity id found in "' . $index . '".');
$data = self::getParsedSet($entity, $set); }
if ($data === NULL) {
throw new Exception('No metadata for set "' . $set . $entity = $entities[$index];
'" available from "' . $index . '".'); $data = self::getParsedSet($entity, $set);
} if ($data === NULL) {
} else { throw new Exception('No metadata for set "' . $set .
SimpleSAML_Logger::warning('MetaData - Handler.DynamicXML: No entity with correct' . '" available from "' . $index . '".');
' entity id found. Using the first entity which defines the correct' .
' metadata.');
foreach ($entities as $entity) {
$data = self::getParsedSet($entity, $set);
if ($data !== NULL) {
break;
}
}
if ($data === NULL) {
throw new Exception('No entities defines metadata for set "' .
$set . '" in "' . $index . '".');
}
} }
$this->writeToCache($set, $index, $data); $this->writeToCache($set, $index, $data);
......
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