JS: Support Parameter[this] token

This commit is contained in:
Asger Feldthaus
2022-03-22 12:35:59 +01:00
parent ac29d5f51b
commit d476f976fe
4 changed files with 77 additions and 62 deletions

View File

@@ -40,6 +40,14 @@ function testPreserveTaint() {
testlib.taintIntoCallback(source(), undefined, undefined, y => {
sink(y); // OK - only callback 1-2 receive taint
});
testlib.taintIntoCallback(source(), function(y) {
sink(y); // NOT OK
sink(this); // OK - receiver is not tainted
});
testlib.taintIntoCallbackThis(source(), function(y) {
sink(y); // OK - only receiver is tainted
sink(this); // NOT OK
});
}
function testSinks() {