use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_deleteAllow_false.
public void test_deleteAllow_false() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.deleteAllow", "false");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertFalse(config.isDeleteAllow());
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_updateAllow.
public void test_updateAllow() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.updateAllow", "true");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertTrue(config.isUpdateAllow());
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_selectAllow_false.
public void test_selectAllow_false() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.selelctAllow", "false");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertFalse(config.isSelelctAllow());
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class PGDenyFunctionTest method test_true.
public void test_true() throws Exception {
WallConfig config = new WallConfig();
config.setFunctionCheck(false);
Assert.assertTrue(//
WallUtils.isValidatePostgres("SELECT current_catalog() from t where id = ?", //
config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallConfigTest method test_insertAllow.
public void test_insertAllow() throws Exception {
Properties properties = new Properties();
properties.setProperty("druid.wall.insertAllow", "true");
WallConfig config = new WallConfig();
config.configFromProperties(properties);
Assert.assertTrue(config.isInsertAllow());
}
Aggregations