use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest102 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(false);
String sql = "select * from t where id = ? or substr(bin(97>>5), -1, 1)";
Assert.assertFalse(provider.checkValid(sql));
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest103 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(false);
String sql = "select * from t where id = ? or 97 & 1";
Assert.assertFalse(provider.checkValid(sql));
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest104 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(false);
String sql = "select * from t where id = ? or 97 | 1";
Assert.assertFalse(provider.checkValid(sql));
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest105 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(false);
String sql = "select * from t where id = ? or binary true";
Assert.assertFalse(provider.checkValid(sql));
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest106 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setCommentAllow(false);
String sql = "select * from t where id = ? or bin(1) = 1";
Assert.assertFalse(provider.checkValid(sql));
}
Aggregations