File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
core/src/main/java/com/onelogin/saml2/authn Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -243,11 +243,9 @@ public boolean isValid(String requestId) {
243243
244244 // Check SAML version on the assertion
245245 NodeList assertions = queryAssertion ("" );
246- for (int i = 0 ; i < assertions .getLength (); i ++) {
247- Node versionAttribute = assertions .item (i ).getAttributes ().getNamedItem ("Version" );
248- if (versionAttribute == null || !"2.0" .equals (versionAttribute .getNodeValue ())) {
249- throw new ValidationError ("Unsupported SAML Version on Assertion." , ValidationError .UNSUPPORTED_SAML_VERSION );
250- }
246+ Node versionAttribute = assertions .item (0 ).getAttributes ().getNamedItem ("Version" );
247+ if (versionAttribute == null || !"2.0" .equals (versionAttribute .getNodeValue ())) {
248+ throw new ValidationError ("Unsupported SAML Version on Assertion." , ValidationError .UNSUPPORTED_SAML_VERSION );
251249 }
252250
253251 if (!this .encrypted && settings .getWantAssertionsEncrypted ()) {
You can’t perform that action at this time.
0 commit comments