Skip to content
Snippets Groups Projects
Commit d32eb4a9 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Make SimpleSAML\Utils\Config\Metadata::isHiddenFromDiscovery() resilient to all kinds of failures.

parent 1ef7d624
No related branches found
No related tags found
No related merge requests found
...@@ -255,12 +255,11 @@ class Metadata ...@@ -255,12 +255,11 @@ class Metadata
* *
* @return boolean True if the entity should be hidden, false otherwise. * @return boolean True if the entity should be hidden, false otherwise.
*/ */
public static function isHiddenFromDiscovery($metadata) public static function isHiddenFromDiscovery(array $metadata)
{ {
if (array_key_exists(self::$ENTITY_CATEGORY, $metadata['EntityAttributes'])) { try {
if (in_array(self::$HIDE_FROM_DISCOVERY, $metadata['EntityAttributes'][self::$ENTITY_CATEGORY])) { return in_array(self::$HIDE_FROM_DISCOVERY, $metadata['EntityAttributes'][self::$ENTITY_CATEGORY]);
return true; } catch (\Exception $e) {
}
} }
return false; return false;
} }
......
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