Skip to content

Commit b346198

Browse files
committed
JS: Remove use of SanitizerGuardNode in experimental SSRF query
Makes a quick effort attempt to restore the original behaviour, though it is not exactly the same due to lack of recursion.
1 parent 0d79c71 commit b346198

File tree

1 file changed

+2
-2
lines changed
  • javascript/ql/src/experimental/Security/CWE-918

1 file changed

+2
-2
lines changed

javascript/ql/src/experimental/Security/CWE-918/SSRF.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ deprecated class Configuration extends TaintTracking::Configuration {
5555
class TernaryOperatorSanitizer extends RequestForgery::Sanitizer {
5656
TernaryOperatorSanitizer() {
5757
exists(
58-
TaintTracking::SanitizerGuardNode guard, IfStmt ifStmt, DataFlow::Node taintedInput,
58+
TaintTracking::AdditionalBarrierGuard guard, IfStmt ifStmt, DataFlow::Node taintedInput,
5959
boolean outcome, Stmt r, DataFlow::Node falseNode
6060
|
6161
ifStmt.getCondition().flow().getAPredecessor+() = guard and
6262
ifStmt.getCondition().flow().getAPredecessor+() = falseNode and
6363
falseNode.asExpr().(BooleanLiteral).mayHaveBooleanValue(false) and
6464
not ifStmt.getCondition() instanceof LogicalBinaryExpr and
65-
guard.sanitizes(outcome, taintedInput.asExpr()) and
65+
guard.blocksExpr(outcome, taintedInput.asExpr()) and
6666
(
6767
outcome = true and r = ifStmt.getThen() and not ifStmt.getCondition() instanceof LogNotExpr
6868
or

0 commit comments

Comments
 (0)