Skip to content
Snippets Groups Projects
Commit 816b8a2f authored by Patrick Radtke's avatar Patrick Radtke
Browse files

Only warn about RegistraionInfo overrides that change the authority

parent 8bc1cbc2
No related branches found
No related tags found
No related merge requests found
......@@ -1039,10 +1039,11 @@ class SimpleSAML_Metadata_SAMLParser
if ($e instanceof SAML2_XML_mdrpi_RegistrationInfo) {
// Registration Authority cannot be overridden
if (isset($ret['RegistrationInfo']['registrationAuthority'])) {
SimpleSAML_Logger::debug('Invalid attempt to override registrationAuthority '
. $ret['RegistrationInfo']['registrationAuthority'] . " with {$e->registrationAuthority}");
// Registration Authority cannot be overridden (warn only if override attempts to change the value)
if (isset($ret['RegistrationInfo']['registrationAuthority'])
&& $ret['RegistrationInfo']['registrationAuthority'] !== $e->registrationAuthority) {
SimpleSAML_Logger::warning('Invalid attempt to override registrationAuthority \''
. $ret['RegistrationInfo']['registrationAuthority'] . "' with '{$e->registrationAuthority}'");
} else {
$ret['RegistrationInfo']['registrationAuthority'] = $e->registrationAuthority;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment