Skip to content

Commit

Permalink
Add missing check for encrypted name id in non encrypted assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
joonlabs committed Sep 11, 2024
1 parent 748293e commit 5e84cc5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Saml2/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public function isValid($requestId = null)
);
}

$this->encryptedNameId = $this->encryptedNameId || $this->_queryAssertion('/saml:Subject/saml:EncryptedID/xenc:EncryptedData')->length > 0;
if (!$this->encryptedNameId && $security['wantNameIdEncrypted']) {
throw new ValidationError(
"The NameID of the Response is not encrypted and the SP requires it",
Expand Down

0 comments on commit 5e84cc5

Please sign in to comment.