add all remaining explicit this

This commit is contained in:
Erik Krogh Kristensen
2021-11-26 13:50:10 +01:00
parent 00ee34c0a0
commit 6ff8d4de5c
104 changed files with 479 additions and 451 deletions

View File

@@ -140,9 +140,9 @@ class RegExpRoot extends RegExpTerm {
// there is at least one repetition
getRoot(any(InfiniteRepetitionQuantifier q)) = this and
// is actually used as a RegExp
isUsedAsRegExp() and
this.isUsedAsRegExp() and
// not excluded for library specific reasons
not isExcluded(getRootTerm().getParent())
not isExcluded(this.getRootTerm().getParent())
}
}
@@ -302,7 +302,7 @@ abstract class CharacterClass extends InputSymbol {
/**
* Gets a character matched by this character class.
*/
string choose() { result = getARelevantChar() and matches(result) }
string choose() { result = this.getARelevantChar() and this.matches(result) }
}
/**

View File

@@ -281,19 +281,19 @@ class UrlsplitUrlparseTempSanitizer extends Sanitizer {
or
full_use.(AttrNode).getObject() = test.getInput().getAUse()
|
clears_taint(full_use, test.getTest(), test.getSense())
this.clears_taint(full_use, test.getTest(), test.getSense())
)
}
private predicate clears_taint(ControlFlowNode tainted, ControlFlowNode test, boolean sense) {
test_equality_with_const(test, tainted, sense)
this.test_equality_with_const(test, tainted, sense)
or
test_in_const_seq(test, tainted, sense)
this.test_in_const_seq(test, tainted, sense)
or
test.(UnaryExprNode).getNode().getOp() instanceof Not and
exists(ControlFlowNode nested_test |
nested_test = test.(UnaryExprNode).getOperand() and
clears_taint(tainted, nested_test, sense.booleanNot())
this.clears_taint(tainted, nested_test, sense.booleanNot())
)
}