mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sqlwall
This commit is contained in:
@@ -445,6 +445,11 @@ public class MySqlWallVisitor extends MySqlASTVisitorAdapter implements WallVisi
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLCommentHint x) {
|
||||
if(!provider.getConfig().isHintAllow()) {
|
||||
addViolation(new IllegalSQLObjectViolation(ErrorCode.EVIL_HINTS, "hint not allow", SQLUtils.toMySqlString(x)));
|
||||
return true;
|
||||
}
|
||||
|
||||
String text = x.getText();
|
||||
text = text.trim();
|
||||
if (text.startsWith("!")) {
|
||||
|
||||
Reference in New Issue
Block a user