Commit b7f11f0f authored by haemmer's avatar haemmer

Added a check for $SProviders[$entityID]['DSURL']

Fixed a bug in main code of readMetadata.php
parent 2cb3b70d
......@@ -411,7 +411,7 @@ function isVerifiedReturnURL($entityID, $returnURL) {
}
// Check using DiscoveryResponse extension
if (in_array($returnURL, $SProviders[$entityID]['DSURL'])){
if (isset($SProviders[$entityID]['DSURL']) in_array($returnURL, $SProviders[$entityID]['DSURL'])){
return true;
}
......
......@@ -78,18 +78,24 @@ if(isRunViaCLI()){
require($metadataSPFile);
}
// Now merge IDPs from metadata and static file
$IDProviders = mergeInfo($IDProviders, $metadataIDProviders, $SAML2MetaOverLocalConf, $includeLocalConfEntries);
// Fow now copy the array by reference
$SProviders = &$metadataSProviders;
} elseif (file_exists($metadataIDPFile)){
// Read SP and IDP files generated with metadata
require($metadataIDPFile);
require($metadataSPFile);
}
// Now merge IDPs from metadata and static file
$IDProviders = mergeInfo($IDProviders, $metadataIDProviders, $SAML2MetaOverLocalConf, $includeLocalConfEntries);
// Fow now copy the array by reference
$SProviders = &$metadataSProviders;
// Now merge IDPs from metadata and static file
$IDProviders = mergeInfo($IDProviders, $metadataIDProviders, $SAML2MetaOverLocalConf, $includeLocalConfEntries);
// Fow now copy the array by reference
$SProviders = &$metadataSProviders;
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment