Skip to content

Commit

Permalink
Fix: public link previews
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
(cherry picked from commit b82840f)
  • Loading branch information
kobergj authored and rhafer committed Mar 12, 2024
1 parent efdc8ff commit 9b24425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-publiclink-previews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix public link previews

Fixes previews for public links

https://github.com/cs3org/reva/pull/4566
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/dav.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (h *DavHandler) Handler(s *svc) http.Handler {
sig := q.Get("signature")
expiration := q.Get("expiration")
// We restrict the pre-signed urls to downloads.
if sig != "" && expiration != "" && r.Method != http.MethodGet {
if sig != "" && expiration != "" && !(r.Method == http.MethodGet || r.Method == http.MethodHead) {
w.WriteHeader(http.StatusUnauthorized)
return
}
Expand Down

0 comments on commit 9b24425

Please sign in to comment.