improve sqlwall

This commit is contained in:
Yako
2014-08-22 16:24:26 +08:00
parent cd31590800
commit 5a5225f33e
2 changed files with 28 additions and 0 deletions
@@ -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("!")) {