Revision: 1864
Author: andreassolberg
Date: Fri Oct 16 05:45:30 2009
Log: Fix two fixes that caused SimpleSAMLphp in some cases to produce
schema-invalid metadata
http://code.google.com/p/simplesamlphp/source/detail?r=1864
Modified:
/trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php
/trunk/lib/SimpleSAML/Metadata/SAMLParser.php
=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php Mon Oct 12 07:00:17 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php Fri Oct 16 05:45:30 2009
@@ -287,7 +287,7 @@
}
- if ( array_key_exists('name', $metadata) ||
array_key_exists('attributes', $metadata)) {
+ if ( array_key_exists('name', $metadata) &&
array_key_exists('attributes', $metadata)) {
/**
* Add an AttributeConsumingService element with
information as name
and description and list
* of requested attributes
=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLParser.php Mon Oct 12 06:18:30 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLParser.php Fri Oct 16 05:45:30 2009
@@ -481,6 +481,7 @@
if($acs === NULL) {
SimpleSAML_Logger::warning('Could not find a supported
SAML 1.x
AssertionConsumerService endpoint for ' .
var_export($ret['entityid'], TRUE) . '.');
+ return;
} else {
$ret['AssertionConsumerService'] = $acs['Location'];
}
@@ -505,7 +506,6 @@
$ret['certData'] = preg_replace('/\s+/', '',
str_replace(array("\r", "\n"), '', $key['X509Certificate']));
break;
}
-
return $ret;
}
@@ -548,6 +548,7 @@
if($sso === NULL) {
SimpleSAML_Logger::warning('Could not find a supported
SAML 1.x
SingleSignOnService endpoint for ' .
var_export($ret['entityid'], TRUE) . '.');
+ return;
} else {
$ret['SingleSignOnService'] = $sso['Location'];
}
@@ -877,8 +878,7 @@
$attcs =
SimpleSAML_Utilities::getDOMChildren($element, 'AttributeConsumingService',
'@md');
if (count($attcs) > 0) {
self::parseAttributeConsumerService($attcs[0], $sp);
- }
-
+ }
$this->spDescriptors[] = $sp;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en
-~----------~----~----~----~------~----~------~--~---