mirror of
https://github.com/github/codeql.git
synced 2026-01-30 06:42:57 +01:00
ReflectedXss: Add an equality test guard
This commit is contained in:
@@ -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, _, _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user