Skip to content

Commit 4ec5d5e

Browse files
committed
enveloped-signature - only rm immediate child sigs
212200b changed the xpath to match all signature nodes descended from the specified local node. This is incorrect; the relevant spec says that only immediate signature elements should be removed This commit corrects the behaviour simply by changing the xpath to only match immediate children Fixes #135 , where further discussion can be found
1 parent bcccb80 commit 4ec5d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/enveloped-signature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function EnvelopedSignature() {
66
}
77

88
EnvelopedSignature.prototype.process = function (node) {
9-
var signature = xpath(node, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")[0];
9+
var signature = xpath(node, "./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")[0];
1010
if (signature) signature.parentNode.removeChild(signature);
1111
return node;
1212
};

0 commit comments

Comments
 (0)