We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e2e4f8 commit 692c40eCopy full SHA for 692c40e
internal/http/services/owncloud/ocdav/meta.go
@@ -58,6 +58,15 @@ func (h *MetaHandler) Handler(s *svc) http.Handler {
58
}
59
60
did := resourceid.OwnCloudResourceIDUnwrap(id)
61
+ if did == nil {
62
+ logger := appctx.GetLogger(r.Context())
63
+ logger.Debug().Str("prop", net.PropOcMetaPathForUser).Msg("invalid resource id")
64
+ w.WriteHeader(http.StatusBadRequest)
65
+ m := fmt.Sprintf("Invalid resource id %v", id)
66
+ b, err := errors.Marshal(http.StatusBadRequest, m, "")
67
+ errors.HandleWebdavError(logger, w, b, err)
68
+ return
69
+ }
70
71
var head string
72
head, r.URL.Path = router.ShiftPath(r.URL.Path)
0 commit comments