Skip to content

Commit 6e22854

Browse files
authored
Update README.md
1 parent 8103352 commit 6e22854

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ In order to protect from some attacks we must check the content we want to use i
142142
var elem = select(doc, "/xpath_to_interesting_element");
143143
var uri = sig.references[0].uri; // might not be 0 - depending on the document you verify
144144
var id = (uri[0] === '#') ? uri.substring(1) : uri;
145-
if (node.getAttribute('ID') != id && node.getAttribute('Id') != id)
145+
if (elem.getAttribute('ID') != id && elem.getAttribute('Id') != id && elem.getAttribute('id') != id)
146146
throw new Error('the interesting element was not the one verified by the signature')
147147
`````
148148

0 commit comments

Comments
 (0)