Missing file in previous commit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
18
patches/003-dav-locks-parsing.patch
Normal file
18
patches/003-dav-locks-parsing.patch
Normal file
@@ -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, "<"), ">")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user