feat(X-Pack): 取消新建数据填报数据库表时对表名和字段名的敏感词校验
This commit is contained in:
parent
957a74e54e
commit
53ae10d82c
@ -39,9 +39,9 @@ public class MysqlExtDDLProvider extends DefaultExtDDLProvider {
|
|||||||
@Override
|
@Override
|
||||||
public String createTableSql(String table, List<ExtTableField> formFields) {
|
public String createTableSql(String table, List<ExtTableField> formFields) {
|
||||||
//check inject
|
//check inject
|
||||||
if (checkSqlInjection(table)) {
|
/*if (checkSqlInjection(table)) {
|
||||||
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
List<ExtTableField.TableField> fields = convertTableFields(true, formFields);
|
List<ExtTableField.TableField> fields = convertTableFields(true, formFields);
|
||||||
String fieldSql = convertTableFieldsString(table, fields);
|
String fieldSql = convertTableFieldsString(table, fields);
|
||||||
@ -249,9 +249,9 @@ public class MysqlExtDDLProvider extends DefaultExtDDLProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check inject
|
//check inject
|
||||||
if (checkSqlInjection(field.getColumnName())) {
|
/*if (checkSqlInjection(field.getColumnName())) {
|
||||||
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//column name
|
//column name
|
||||||
str.append("`").append(field.getColumnName()).append("` ");
|
str.append("`").append(field.getColumnName()).append("` ");
|
||||||
@ -345,9 +345,9 @@ public class MysqlExtDDLProvider extends DefaultExtDDLProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check inject
|
//check inject
|
||||||
if (checkSqlInjection(table) || checkSqlInjection(indexField.getName())) {
|
/*if (checkSqlInjection(table) || checkSqlInjection(indexField.getName())) {
|
||||||
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
throw new RuntimeException("包含SQL注入的参数,请检查参数!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (ExtIndexField.ColumnSetting indexFieldColumn : indexField.getColumns()) {
|
for (ExtIndexField.ColumnSetting indexFieldColumn : indexField.getColumns()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user