diff options
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Utilities.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index ef31974..3657a5f 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -2152,8 +2152,14 @@ class SimpleSAML_Utilities { if (isset($candidates[$idpmetadata['auth']])) { return $candidates[$idpmetadata['auth']]; } - throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' . - var_export($idpmetadata['entityid'], TRUE) . '.'); + if (strpos($idpmetadata['auth'], '/') !== FALSE) { + /* Probably a file. */ + throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' . + var_export($idpmetadata['entityid'], TRUE) . '.'); + } else { + throw new SimpleSAML_Error_Exception('Unknown authsource ' . + var_export($idpmetadata['auth'], TRUE) . '.'); + } } |