mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
add all remaining explicit this
This commit is contained in:
@@ -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) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user