mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JavaScript: Add new tests for recognising receiver of event handler as DOM element.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| query-tests/Security/CWE-079/DomBasedXss/event-handler-receiver.js:2 | expected an alert, but found none | NOT OK | |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
document.getElementById('my-id').onclick = function() {
|
||||
this.parentNode.innerHTML = '<h2><a href="' + location.href + '">A link</a></h2>'; // NOT OK
|
||||
};
|
||||
Reference in New Issue
Block a user