TypeOfCheck -> TypeOfUndefinedSanitizer

Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
Erik Krogh Kristensen
2020-06-05 11:35:39 +02:00
committed by GitHub
parent 05d7be8e23
commit 82cf53897f

View File

@@ -828,11 +828,11 @@ module TaintTracking {
}
/** A check of the form `type x === "undefined"`, which sanitized `x` in its "then" branch. */
class TypeOfCheck extends AdditionalSanitizerGuardNode, DataFlow::ValueNode {
class TypeOfUndefinedSanitizer extends AdditionalSanitizerGuardNode, DataFlow::ValueNode {
Expr x;
override EqualityTest astNode;
TypeOfCheck() {
TypeOfUndefinedSanitizer() {
exists(StringLiteral str, TypeofExpr typeof | astNode.hasOperands(str, typeof) |
str.getValue() = "undefined" and
typeof.getOperand() = x