Skip to content

Commit

Permalink
Obliterate double-escaping; if this is necessary, the other side is d…
Browse files Browse the repository at this point in the history
…oing something wrong
  • Loading branch information
stouset committed Apr 5, 2013
1 parent af45bbe commit 805428c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xml_security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def validate_doc(base64_cert, soft = true)

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

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

Expand Down

0 comments on commit 805428c

Please sign in to comment.