Skip to content

Commit 187feb3

Browse files
committed
Fix re-prefixing of XML-tags
1 parent 97a4d0e commit 187feb3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎src/XML/SignedElementTrait.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ private function validateReference(SignedInfo $signedInfo): SignedElementInterfa
143143
}
144144

145145
// Clone the document so we don't mess up the original DOMDocument
146-
$doc = DOMDocumentFactory::create();
147-
$node = $doc->importNode($xml->ownerDocument->documentElement, true);
148-
$doc->appendChild($node);
146+
$doc = DOMDocumentFactory::fromString($xml->ownerDocument->saveXML($xml->ownerDocument->documentElement));
149147

150148
$xp = XPath::getXPath($doc);
151149
$sigNode = XPath::xpQuery($doc->documentElement, 'child::ds:Signature', $xp);

0 commit comments

Comments
 (0)