Skip to content

Commit 805428c

Browse files
committed
Obliterate double-escaping; if this is necessary, the other side is doing something wrong
1 parent af45bbe commit 805428c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xml_security.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def validate_doc(base64_cert, soft = true)
9494

9595
hashed_element = document.at_xpath("//*[@ID='#{uri[1..-1]}']")
9696
canon_algorithm = canon_algorithm REXML::XPath.first(ref, '//ds:CanonicalizationMethod', 'ds' => DSIG)
97-
canon_hashed_element = hashed_element.canonicalize(canon_algorithm, inclusive_namespaces).gsub(/&(?!amp;)/,'&')
97+
canon_hashed_element = hashed_element.canonicalize(canon_algorithm, inclusive_namespaces)
9898

9999
digest_algorithm = algorithm(REXML::XPath.first(ref, "//ds:DigestMethod"))
100100

0 commit comments

Comments
 (0)