Skip to content

Commit 0791fc5

Browse files
RivalAUTLukas Fabian
andauthored
[SANTUARIO-576] Fix saml validation with saaj 1.4+ (#453)
* [SANTUARIO-576] Fix saml validation with saaj 1.4 Signature element was not removed due to type mismatch * [SANTUARIO-576] Check for reference equality first --------- Co-authored-by: Lukas Fabian <lukas.fabian@svc.co.at>
1 parent 2a49610 commit 0791fc5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private void canonicalizeSubTree(
241241

242242
case Node.ELEMENT_NODE :
243243
documentLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT;
244-
if (currentNode == excludeNode) {
244+
if (currentNode == excludeNode || (excludeNode != null && (excludeNode.isSameNode(currentNode) || currentNode.isSameNode(excludeNode)))) {
245245
break;
246246
}
247247
Element currentElement = (Element)currentNode;

0 commit comments

Comments
 (0)