Files
codeql/javascript/ql/test/query-tests/Security/CWE-079/jquery.js
2018-08-02 17:53:23 +01:00

11 lines
332 B
JavaScript

function test() {
var tainted = document.location.search
$(tainted); // NOT OK
$("body", tainted); // OK
$("." + tainted); // OK
$("<div id=\"" + tainted + "\">"); // NOT OK
$("body").html("XSS: " + tainted); // NOT OK
$(window.location.hash); // OK
}