Skip to content

Commit f752f23

Browse files
committed
feat: update safe sql characters
1 parent 267e923 commit f752f23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/topcoder/dal/util/QueryHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ public static String sanitizeSQLStatement(String sql) {
200200
StringBuilder safeSQL = new StringBuilder();
201201
for (char c : sql.toCharArray()) {
202202
if (Character.isLetterOrDigit(c) || c == ' ' || c == ',' || c == '(' || c == ')' || c == '=' || c == '<'
203-
|| c == '>' || c == '_' || c == ':' || c == '.' || c == '-' || c == '+' || c == '*' || c == '\'') {
203+
|| c == '>' || c == '_' || c == ':' || c == '.' || c == '-' || c == '+' || c == '*' || c == '\''
204+
|| c == '!') {
204205
safeSQL.append(c);
205206
}
206207
}

0 commit comments

Comments
 (0)