Skip to content

Commit 0f65c78

Browse files
committed
Normalize attributes before validating them
This provides more accurate validation results, otherwise an IdP sending only OID will fail all checks. The minor drawback is that the debug page will show the already normalized names of the attributes. This is not a big problem per se I think, because in the end EB will work with this set, to what you send needs to be normalizable to this. Closes: #45
1 parent 03fd5ad commit 0f65c78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/EngineBlock/Corto/Module/Service/SingleSignOn.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ protected function _sendDebugMail(EngineBlock_Saml2_ResponseAnnotationDecorator
554554
$identityProvider = $this->_server->getRepository()->fetchIdentityProviderByEntityId($response->getIssuer()->getValue());
555555

556556
$attributes = $response->getAssertion()->getAttributes();
557+
$normalizer = new EngineBlock_Attributes_Normalizer($attributes);
558+
$attributes = $normalizer->normalize();
557559

558560
$validationResult = EngineBlock_ApplicationSingleton::getInstance()
559561
->getDiContainer()
@@ -708,6 +710,8 @@ private function _displayDebugResponse($serviceName)
708710
}
709711

710712
$attributes = $response->getAssertion()->getAttributes();
713+
$normalizer = new EngineBlock_Attributes_Normalizer($attributes);
714+
$attributes = $normalizer->normalize();
711715

712716
$validationResult = EngineBlock_ApplicationSingleton::getInstance()
713717
->getDiContainer()

0 commit comments

Comments
 (0)