fix: 兼容redis密码验证。

This commit is contained in:
Mr. Lan
2020-09-19 00:58:03 +08:00
parent 0ac9150e59
commit 8608380d55
4 changed files with 8 additions and 11 deletions

View File

@@ -221,8 +221,11 @@ func TaskDetails(c *gin.Context) {
)
fileName = c.DefaultQuery("file_name", "")
if fileName == "" {
app.Error(c, -1, errors.New("参数不正确,请确认file_name参数是否存在"), "")
if fileName == "" ||
strings.HasPrefix(fileName, ".") ||
strings.HasPrefix(fileName, "/") ||
strings.HasPrefix(fileName, "\\") {
app.Error(c, -1, errors.New("file_name参数不正确请确认"), "")
return
}