Skip to content

Commit

Permalink
Revert "validateSignature: Support XML docs that contain multiple sig…
Browse files Browse the repository at this point in the history
…ned nodes (#455)" (#480)

This reverts commit 43df9ad.
  • Loading branch information
cjbarth committed Oct 29, 2020
1 parent 43df9ad commit aa4fa86
Show file tree
Hide file tree
Showing 30 changed files with 2 additions and 1,920 deletions.
7 changes: 2 additions & 5 deletions src/passport-saml/saml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,8 @@ class SAML {
// See https://github.com/bergie/passport-saml/issues/19 for references to some of the attack
// vectors against SAML signature verification.
validateSignature = function (fullXml, currentNode, certs) {
const xpathSigQuery = ".//*[" +
"local-name(.)='Signature' and " +
"namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#' and " +
"descendant::*[local-name(.)='Reference' and @URI='#"+currentNode.getAttribute('ID')+"']" +
"]";
const xpathSigQuery = ".//*[local-name(.)='Signature' and " +
"namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']";
const signatures = xpath(currentNode, xpathSigQuery);
// This function is expecting to validate exactly one signature, so if we find more or fewer
// than that, reject.
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit aa4fa86

Please sign in to comment.