diff --git a/patches/003-dav-locks-parsing.patch b/patches/003-dav-locks-parsing.patch new file mode 100644 index 0000000..f6ae495 --- /dev/null +++ b/patches/003-dav-locks-parsing.patch @@ -0,0 +1,18 @@ +--- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/locks.go ++++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/locks.go +@@ -649,5 +649,13 @@ func (s *svc) unlockReference(ctx context.Context, _ http.ResponseWriter, r *htt + } + + func requestLockToken(r *http.Request) string { +- return strings.TrimSuffix(strings.TrimPrefix(r.Header.Get(net.HeaderLockToken), "<"), ">") ++ h := r.Header.Get(net.HeaderLockToken) ++ if len(h) == 0 { ++ h = r.Header.Get(net.HeaderIf) ++ if untagged := strings.Index(h, "(<"); untagged > 0 { ++ h = h[untagged:] ++ } ++ h = strings.TrimSuffix(strings.TrimPrefix(h, "("), ")") ++ } ++ return strings.TrimSuffix(strings.TrimPrefix(h, "<"), ">") + } +