修复因unzip功能导致的在resourcePatchHandler函数中进行其它操作时判断逻辑错误问题

This commit is contained in:
unknown 2022-11-22 17:45:46 +08:00
parent 9fb103aee1
commit 9ab6d1d373

View File

@ -192,7 +192,7 @@ func resourcePatchHandler(fileCache FileCache) handleFunc {
if err != nil { if err != nil {
return errToStatus(err), err return errToStatus(err), err
} }
if dst == "/" || src == "/" || action != "unzip" { if (dst == "/" || src == "/") && action != "unzip" {
return http.StatusForbidden, nil return http.StatusForbidden, nil
} }