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

This commit is contained in:
Andy Hsu 2023-02-23 21:19:50 +08:00
parent f95d843969
commit 0d3146b51d

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