committed by
Ralf Haferkamp
parent
400dc9f8ae
commit
f21207ed96
Generated
Vendored
-4
@@ -97,10 +97,6 @@ func (s *svc) handleSpacesMkCol(w http.ResponseWriter, r *http.Request, spaceID
|
||||
|
||||
sublog := appctx.GetLogger(ctx).With().Str("path", r.URL.Path).Str("spaceid", spaceID).Str("handler", "mkcol").Logger()
|
||||
|
||||
if err := ValidateName(filename(r.URL.Path), s.nameValidators); err != nil {
|
||||
return http.StatusBadRequest, err
|
||||
}
|
||||
|
||||
parentRef, err := spacelookup.MakeStorageSpaceReference(spaceID, path.Dir(r.URL.Path))
|
||||
if err != nil {
|
||||
return http.StatusBadRequest, fmt.Errorf("invalid space id")
|
||||
|
||||
Generated
Vendored
-10
@@ -131,16 +131,6 @@ func (s *svc) handleSpacesMove(w http.ResponseWriter, r *http.Request, srcSpaceI
|
||||
|
||||
dstSpaceID, dstRelPath := router.ShiftPath(dst)
|
||||
|
||||
if dstRelPath != "" && dstRelPath != "." && dstRelPath != "/" {
|
||||
err := ValidateDestination(filename(dstRelPath), s.nameValidators)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
b, err := errors.Marshal(http.StatusBadRequest, "destination naming rules", "", "")
|
||||
errors.HandleWebdavError(appctx.GetLogger(ctx), w, b, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
dstRef, err := spacelookup.MakeStorageSpaceReference(dstSpaceID, dstRelPath)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
|
||||
Reference in New Issue
Block a user