You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: Are there already classes for any of below(above) in a pre-existing regex library?
21
+
// TODO: Look for above in pre-existing regex libraries again.
21
22
// TODO: look into further: Pattern.matcher, .pattern() and .toString() as taint steps, .split and .splitAsStream
22
23
/**
23
24
* A data flow sink for untrusted user input used to construct regular expressions.
@@ -37,7 +38,7 @@ class RegexSink extends DataFlow::ExprNode {
37
38
m.getDeclaringType()instanceofApacheRegExUtilsand
38
39
(
39
40
ma.getArgument(1)=this.asExpr()and
40
-
m.getParameterType(1)instanceofTypeStringand// only does String here because other option is Patter, but that's already handled by `java.util.regex.Pattern` above
41
+
m.getParameterType(1)instanceofTypeStringand// only does String here because other option is Pattern, but that's already handled by `java.util.regex.Pattern` above
0 commit comments