fix typo, fix #4085

This commit is contained in:
高铁
2020-12-12 12:40:37 +08:00
parent b04ff9b889
commit 9906e5938a
3 changed files with 22 additions and 6 deletions
@@ -701,14 +701,30 @@ public class WallConfig implements WallConfigMBean {
void filterResultsetTenantColumn(Object value);
}
public boolean isSelelctAllow() {
public boolean isSelectAllow() {
return selelctAllow;
}
public void setSelelctAllow(boolean selelctAllow) {
public void setSelectAllow(boolean selelctAllow) {
this.selelctAllow = selelctAllow;
}
/**
* @deprecated use isSelectAllow
*/
public boolean isSelelctAllow() {
return isSelectAllow();
}
/**
* @deprecated use setSelelctAllow
*/
public void setSelelctAllow(boolean selelctAllow) {
this.setSelectAllow(selelctAllow);
}
public boolean isSelectWhereAlwayTrueCheck() {
return selectWhereAlwayTrueCheck;
}
@@ -827,7 +843,7 @@ public class WallConfig implements WallConfigMBean {
{
Boolean propertyValue = getBoolean(properties, "druid.wall.selelctAllow");
if (propertyValue != null) {
this.setSelelctAllow(propertyValue);
this.setSelectAllow(propertyValue);
}
}
{
@@ -149,7 +149,7 @@ public interface WallVisitor extends SQLASTVisitor {
@Override
default boolean visit(SQLSelectStatement x) {
WallConfig config = getConfig();
if (!config.isSelelctAllow()) {
if (!config.isSelectAllow()) {
this.getViolations()
.add(new IllegalSQLObjectViolation(ErrorCode.SELECT_NOT_ALLOW, "select not allow",
this.toSQL(x)));