Skip to content

Commit

Permalink
Remove SAML-specific restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jul 22, 2024
1 parent fc0b03b commit 01128b2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/XML/SignedElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,11 @@ private function validateReferenceUri(Reference $reference, DOMElement $xml): vo
*/
private function validateReference(SignedInfo $signedInfo): SignedElementInterface
{
$references = $signedInfo->getReferences();
Assert::count(
$references,
1,
'Exactly one reference expected in signature.',
TooManyElementsException::class,
);
$reference = array_pop($references);

$xml = $this->getOriginalXML();
$this->validateReferenceUri($reference, $xml);
$references = $signedInfo->getReferences();
foreach ($references as $reference) {
$this->validateReferenceUri($reference, $xml);
}

$xp = XPath::getXPath($xml->ownerDocument);
$sigNode = XPath::xpQuery($xml, 'child::ds:Signature', $xp);
Expand Down

0 comments on commit 01128b2

Please sign in to comment.