Commit 6c4e4e3f authored by haemmer's avatar haemmer

Fixed #605 and #606 using contributed patches

parent b68130c2
......@@ -8,6 +8,9 @@
// readMetadata.php periodically as web server user, e.g. with a cron entry like:
// 5 * * * * /usr/bin/php readMetadata.php > /dev/null
// Init log file
openlog("SWITCHwayf.readMetadata.php", LOG_PID | LOG_PERROR, LOG_LOCAL0);
// Make sure this script is not accessed directly
if(isRunViaCLI()){
// Run in cli mode.
......@@ -150,7 +153,9 @@ function parseMetadata($metadataFile, $defaultLanguage){
$entityID = $EntityDescriptor->getAttribute('entityID');
foreach($EntityDescriptor->childNodes as $RoleDescriptor) {
switch($RoleDescriptor->nodeName){
$nodeName = $RoleDescriptor->nodeName;
$nodeName = preg_replace('/^(\w+\:)/', '', $nodeName);
switch($nodeName){
case 'IDPSSODescriptor':
$IDP = processIDPRoleDescriptor($RoleDescriptor);
if ($IDP){
......@@ -161,7 +166,10 @@ function parseMetadata($metadataFile, $defaultLanguage){
$SP = processSPRoleDescriptor($RoleDescriptor);
if ($SP){
$metadataSProviders[$entityID] = $SP;
}
echo "SP added: $entityID\n";
} else {
echo "Failed to load SP with entityID $entityID from metadata file $metadataFile";
}
break;
default:
}
......
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