@@ -135,7 +135,7 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
135135 exists ( Annotation annotation |
136136 unsafeExpression
137137 .regexpMatch ( "\\$\\{\\s*" + annotation .getValue ( "value" ) .( CompileTimeConstantExpr ) .getStringValue ( ) +
138- "\\b[^}]*? \\}" ) and
138+ "\\b[^}]*\\}" ) and
139139 annotation .getType ( ) instanceof TypeParam and
140140 ma .getAnArgument ( ) = node .asExpr ( ) and
141141 annotation .getTarget ( ) =
@@ -153,11 +153,11 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
153153 exists ( int i |
154154 not ma .getMethod ( ) .getParameter ( i ) .getAnAnnotation ( ) .getType ( ) instanceof TypeParam and
155155 (
156- unsafeExpression .regexpMatch ( "\\$\\{\\s*param" + ( i + 1 ) + "\\b[^}]*? \\}" )
156+ unsafeExpression .regexpMatch ( "\\$\\{\\s*param" + ( i + 1 ) + "\\b[^}]*\\}" )
157157 or
158- unsafeExpression .regexpMatch ( "\\$\\{\\s*arg" + i + "\\b[^}]*? \\}" )
158+ unsafeExpression .regexpMatch ( "\\$\\{\\s*arg" + i + "\\b[^}]*\\}" )
159159 or
160- unsafeExpression .regexpMatch ( "\\$\\{\\s*" + ma .getMethod ( ) .getParameter ( i ) .getName ( ) + "\\b[^}]*? \\}" )
160+ unsafeExpression .regexpMatch ( "\\$\\{\\s*" + ma .getMethod ( ) .getParameter ( i ) .getName ( ) + "\\b[^}]*\\}" )
161161 ) and
162162 ma .getArgument ( i ) = node .asExpr ( )
163163 )
@@ -172,7 +172,7 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
172172 exists ( int i , RefType t |
173173 not ma .getMethod ( ) .getParameter ( i ) .getAnAnnotation ( ) .getType ( ) instanceof TypeParam and
174174 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
176176 ma .getArgument ( i ) = node .asExpr ( )
177177 )
178178 or
0 commit comments