ReflectedXss: Add an equality test guard

This commit is contained in:
Sauyon Lee
2020-05-12 04:53:18 -07:00
parent 1ef06e9e40
commit 33e4961c95

View File

@@ -103,4 +103,13 @@ module ReflectedXss {
)
}
}
/**
* A check against a constant value, considered a barrier for reflected XSS.
*/
class EqualityTestGuard extends SanitizerGuard, DataFlow::EqualityTestNode {
override predicate checks(Expr e, boolean outcome) {
e = this.getAnOperand().asExpr() and this.eq(outcome, _, _)
}
}
}