Skip to content

Commit

Permalink
fix(public-share-auth): allow to create new documents in public share…
Browse files Browse the repository at this point in the history
… folder

The public share authentication middleware only allowed to open existing documents
the /app/new route was missing.

Fixes #8691
  • Loading branch information
rhafer committed Apr 10, 2024
1 parent 52b00b1 commit bff6cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/proxy/pkg/middleware/public_share_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func isPublicShareArchive(r *http.Request) bool {
// The app open requests can also be made in authenticated context. In these cases the PublicShareAuthenticator
// needs to ignore the request.
func isPublicShareAppOpen(r *http.Request) bool {
return strings.HasPrefix(r.URL.Path, "/app/open") &&
return (strings.HasPrefix(r.URL.Path, "/app/open") || strings.HasPrefix(r.URL.Path, "/app/new")) &&
(r.URL.Query().Get(headerShareToken) != "" || r.Header.Get(headerShareToken) != "")
}

Expand Down

0 comments on commit bff6cc0

Please sign in to comment.