mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
JS: Canonicalize ThisNode
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:30:14:30:20 | x.value |
|
||||
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:41:10:41:18 | id(taint) |
|
||||
| partialCalls.js:4:17:4:24 | source() | partialCalls.js:51:14:51:14 | x |
|
||||
| thisAssignments.js:4:17:4:24 | source() | thisAssignments.js:5:10:5:18 | obj.field |
|
||||
| thisAssignments.js:7:19:7:26 | source() | thisAssignments.js:8:10:8:20 | this.field2 |
|
||||
| tst.js:2:13:2:20 | source() | tst.js:4:10:4:10 | x |
|
||||
| tst.js:2:13:2:20 | source() | tst.js:5:10:5:22 | "/" + x + "!" |
|
||||
| tst.js:2:13:2:20 | source() | tst.js:14:10:14:17 | x.sort() |
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class C {
|
||||
foo() {
|
||||
let obj = {};
|
||||
obj.field = source();
|
||||
sink(obj.field); // NOT OK - tainted
|
||||
|
||||
this.field2 = source();
|
||||
sink(this.field2); // NOT OK - tainted
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user