mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve wall filter
This commit is contained in:
@@ -14,7 +14,7 @@ import com.alibaba.druid.wall.spi.SQLServerWallProvider;
|
||||
|
||||
public class WallStatTest_delete extends TestCase {
|
||||
|
||||
private String sql = "delete from t where fid = ?";
|
||||
private String sql = "delete from T where fid = ?";
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
WallContext.clearContext();
|
||||
|
||||
@@ -29,8 +29,8 @@ import com.alibaba.druid.wall.WallUtils;
|
||||
public class WallUnionTest3 extends TestCase {
|
||||
|
||||
public void testMySql() throws Exception {
|
||||
Assert.assertFalse(WallUtils.isValidateMySql("SELECT id, product FROM test.test t LIMIT 0,0 UNION ALL SELECT 1,'x'"));
|
||||
Assert.assertFalse(WallUtils.isValidateMySql("SELECT id, product FROM test.test t LIMIT 0,0 UNION ALL SELECT 1,'x';"));
|
||||
// Assert.assertFalse(WallUtils.isValidateMySql("SELECT id, product FROM test.test t LIMIT 0,0 UNION ALL SELECT 1,'x'"));
|
||||
// Assert.assertFalse(WallUtils.isValidateMySql("SELECT id, product FROM test.test t LIMIT 0,0 UNION ALL SELECT 1,'x';"));
|
||||
Assert.assertFalse(WallUtils.isValidateMySql("SELECT id, product FROM test.test t LIMIT 0,0 UNION ALL SELECT 1,'x'/*,10 ;"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import com.alibaba.druid.filter.FilterAdapter;
|
||||
|
||||
@@ -20,11 +20,11 @@ import java.sql.Statement;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.junit.Assert;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import com.alibaba.druid.spring.User;
|
||||
|
||||
Reference in New Issue
Block a user