Skip to content

Commit e92738a

Browse files
Apply suggestions from code review
Co-authored-by: Chris Smowton <smowton@github.com>
1 parent 92e0f02 commit e92738a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ql/src/experimental/CWE-942/CorsMisconfiguration.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ class FlowsFromUntrusted extends TaintTracking::Configuration {
122122

123123
predicate isSink(DataFlow::Node sink, ControlFlow::ConditionGuardNode cgn) {
124124
exists(IfStmt ifs |
125-
exists(Expr child, Expr operand |
126-
child = ifs.getCond().getAChildExpr*() and
127-
operand = child and
125+
exists(Expr operand |
126+
operand = ifs.getCond().getAChildExpr*() and
128127
(
129-
//
130128
exists(DataFlow::CallExpr call | call = operand |
131129
call.getTarget().hasQualifiedName("strings", "HasSuffix") and
132130
sink.asExpr() = call.getArgument(0)

0 commit comments

Comments
 (0)