mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Support Parameter[this] token
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user