Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

druid 版本1.2.11 使用中括号语法错误 #5743

Closed
ywill3 opened this issue Feb 22, 2024 · 0 comments
Closed

druid 版本1.2.11 使用中括号语法错误 #5743

ywill3 opened this issue Feb 22, 2024 · 0 comments

Comments

@ywill3
Copy link

ywill3 commented Feb 22, 2024

使用如下代码 报语法错误

 DruidPooledConnection connection = dataSource.getConnection();
 ResultSet resultSet = connection.prepareStatement("select array_length(['1'])").executeQuery();

错误信息如下:
[ERROR][WallFilter] sql injection violation, dbType mariadb, druid-version 1.2.11, syntax error: ERROR. pos 21, line 1, column 21, token [ : select array_length(['1'])

需要设置setStrictSyntaxCheck=false

lizongbo added a commit to lizongbo/druid that referenced this issue May 14, 2024
lizongbo added a commit that referenced this issue May 14, 2024
优化中括号解析逻辑 #5908 , #5743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants