JS: Canonicalize ThisNode

This commit is contained in:
Asger F
2018-10-03 13:30:59 +01:00
parent 3bc5e3bfdf
commit 030bae9454
10 changed files with 78 additions and 7 deletions

View File

@@ -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() |

View File

@@ -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
}
}