@@ -135,7 +135,7 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
135
135
exists ( Annotation annotation |
136
136
unsafeExpression
137
137
.regexpMatch ( "\\$\\{\\s*" + annotation .getValue ( "value" ) .( CompileTimeConstantExpr ) .getStringValue ( ) +
138
- "\\b[^}]*? \\}" ) and
138
+ "\\b[^}]*\\}" ) and
139
139
annotation .getType ( ) instanceof TypeParam and
140
140
ma .getAnArgument ( ) = node .asExpr ( ) and
141
141
annotation .getTarget ( ) =
@@ -153,11 +153,11 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
153
153
exists ( int i |
154
154
not ma .getMethod ( ) .getParameter ( i ) .getAnAnnotation ( ) .getType ( ) instanceof TypeParam and
155
155
(
156
- unsafeExpression .regexpMatch ( "\\$\\{\\s*param" + ( i + 1 ) + "\\b[^}]*? \\}" )
156
+ unsafeExpression .regexpMatch ( "\\$\\{\\s*param" + ( i + 1 ) + "\\b[^}]*\\}" )
157
157
or
158
- unsafeExpression .regexpMatch ( "\\$\\{\\s*arg" + i + "\\b[^}]*? \\}" )
158
+ unsafeExpression .regexpMatch ( "\\$\\{\\s*arg" + i + "\\b[^}]*\\}" )
159
159
or
160
- unsafeExpression .regexpMatch ( "\\$\\{\\s*" + ma .getMethod ( ) .getParameter ( i ) .getName ( ) + "\\b[^}]*? \\}" )
160
+ unsafeExpression .regexpMatch ( "\\$\\{\\s*" + ma .getMethod ( ) .getParameter ( i ) .getName ( ) + "\\b[^}]*\\}" )
161
161
) and
162
162
ma .getArgument ( i ) = node .asExpr ( )
163
163
)
@@ -172,7 +172,7 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
172
172
exists ( int i , RefType t |
173
173
not ma .getMethod ( ) .getParameter ( i ) .getAnAnnotation ( ) .getType ( ) instanceof TypeParam and
174
174
ma .getMethod ( ) .getParameterType ( i ) .getName ( ) = t .getName ( ) and
175
- unsafeExpression .regexpMatch ( "\\$\\{\\s*" + t .getAField ( ) .getName ( ) + "\\b[^}]*? \\}" ) and
175
+ unsafeExpression .regexpMatch ( "\\$\\{\\s*" + t .getAField ( ) .getName ( ) + "\\b[^}]*\\}" ) and
176
176
ma .getArgument ( i ) = node .asExpr ( )
177
177
)
178
178
or
0 commit comments