Skip to content

Commit 0d2474b

Browse files
committed
Autoformat
1 parent 0edfc6e commit 0d2474b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

java/ql/src/experimental/Security/CWE/CWE-089/MyBatisCommonLib.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
128128
// ```java
129129
// @Select(select id,name from test order by ${orderby,jdbcType=VARCHAR})
130130
// void test(@Param("orderby") String name);
131-
//
131+
//
132132
// @Select(select id,name from test where name = ${ user . name })
133133
// void test(@Param("user") User u);
134134
// ```
135135
exists(Annotation annotation |
136136
unsafeExpression
137-
.regexpMatch("\\$\\{\\s*" + annotation.getValue("value").(CompileTimeConstantExpr).getStringValue() +
137+
.regexpMatch("\\$\\{\\s*" +
138+
annotation.getValue("value").(CompileTimeConstantExpr).getStringValue() +
138139
"\\b[^}]*\\}") and
139140
annotation.getType() instanceof TypeParam and
140141
ma.getAnArgument() = node.asExpr() and
@@ -157,7 +158,8 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
157158
or
158159
unsafeExpression.regexpMatch("\\$\\{\\s*arg" + i + "\\b[^}]*\\}")
159160
or
160-
unsafeExpression.regexpMatch("\\$\\{\\s*" + ma.getMethod().getParameter(i).getName() + "\\b[^}]*\\}")
161+
unsafeExpression
162+
.regexpMatch("\\$\\{\\s*" + ma.getMethod().getParameter(i).getName() + "\\b[^}]*\\}")
161163
) and
162164
ma.getArgument(i) = node.asExpr()
163165
)

0 commit comments

Comments
 (0)