fix(webdav): disable put with empty path (close #3569)

pull/3612/head
Andy Hsu 2023-02-23 21:19:50 +08:00
parent f95d843969
commit 0d3146b51d
1 changed files with 3 additions and 0 deletions

View File

@ -296,6 +296,9 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int,
if err != nil {
return status, err
}
if reqPath == "" {
return http.StatusMethodNotAllowed, nil
}
release, status, err := h.confirmLocks(r, reqPath, "")
if err != nil {
return status, err