Skip to content

Commit ca4c988

Browse files
committed
Remove redundant variable
1 parent 2e0f244 commit ca4c988

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

java/ql/src/experimental/Security/CWE/CWE-625/PermissiveDotRegexQuery.qll

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,12 @@ private class SpringUriInputParameterSource extends DataFlow::Node {
7777
*/
7878
private class CompileRegexSink extends DataFlow::ExprNode {
7979
CompileRegexSink() {
80-
exists(MethodCall ma, Method m | m = ma.getMethod() |
81-
(
82-
ma.getArgument(0) = this.asExpr() and
83-
(
84-
ma instanceof StringMatchesCall // input.matches(regexPattern)
85-
or
86-
ma instanceof PatternCompileCall // p = Pattern.compile(regexPattern)
87-
or
88-
ma instanceof PatternMatchesCall // p = Pattern.matches(regexPattern, input)
89-
)
90-
)
80+
exists(MethodCall ma | ma.getArgument(0) = this.asExpr() |
81+
ma instanceof StringMatchesCall // input.matches(regexPattern)
82+
or
83+
ma instanceof PatternCompileCall // p = Pattern.compile(regexPattern)
84+
or
85+
ma instanceof PatternMatchesCall // p = Pattern.matches(regexPattern, input)
9186
)
9287
}
9388
}

0 commit comments

Comments
 (0)