fix(public-share-auth): allow to create new documents in public share folder
The public share authentication middleware only allowed to open existing documents
the /app/new route was missing.
Fixes #8691
(cherry picked from commit 8d5a0c6dd8)
This commit is contained in:
@@ -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) != "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user