mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
JavaScript: Do not taint for-in loop variable.
This commit is contained in:
@@ -285,3 +285,10 @@ function testCreateContextualFragment() {
|
||||
var documentFragment = range.createContextualFragment(tainted); // NOT OK
|
||||
document.body.appendChild(documentFragment);
|
||||
}
|
||||
|
||||
function flowThroughPropertyNames() {
|
||||
var obj = {};
|
||||
obj[Math.random()] = window.name;
|
||||
for (var p in obj)
|
||||
$(p); // OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user