新增字符串过滤

This commit is contained in:
boyce
2019-07-27 18:49:00 +08:00
parent 7bbfc9e21d
commit 716a8e0946

View File

@@ -342,6 +342,9 @@ func (slf *DBModule) CheckArgs(args ...interface{}) error {
if strings.Contains(retVal, "-") == true {
return fmt.Errorf("CheckArgs is error arg is %+v", retVal)
}
if strings.Contains(retVal, "#") == true {
return fmt.Errorf("CheckArgs is error arg is %+v", retVal)
}
if strings.Contains(retVal, "&") == true {
return fmt.Errorf("CheckArgs is error arg is %+v", retVal)
}
@@ -366,6 +369,9 @@ func (slf *DBModule) CheckArgs(args ...interface{}) error {
if strings.Contains(strings.ToLower(retVal), "from ") == true {
return fmt.Errorf("CheckArgs is error arg is %+v", retVal)
}
if strings.Contains(strings.ToLower(retVal), "set ") == true {
return fmt.Errorf("CheckArgs is error arg is %+v", retVal)
}
}
}