sqlwall improve

This commit is contained in:
Yako
2014-11-06 17:23:33 +08:00
parent 242577e79b
commit 5ff70a80ef
@@ -174,14 +174,21 @@ public class WallVisitorUtils {
chrCount++;
}
}
} else if (item instanceof SQLCharExpr) {
if (((SQLCharExpr) item).getText().length() > 5) {
chrCount = 0;
continue;
}
}
if (chrCount >= 4) {
addViolation(visitor, ErrorCode.EVIL_CONCAT, "evil concat", x);
break;
}
}
if (chrCount >= 4) {
addViolation(visitor, ErrorCode.EVIL_CONCAT, "evil concat", x);
}
}
}
return true;
}
@@ -1092,7 +1099,6 @@ public class WallVisitorUtils {
return eval(visitor, dbType, x, Collections.emptyList());
}
public static SQLExpr getFirst(SQLExpr x) {
if (x instanceof SQLBinaryOpExpr) {