mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-03 02:39:52 -06:00
fix some authentication cases
This commit is contained in:
@@ -41,6 +41,8 @@ var (
|
||||
// _unprotectedPathPrefixes contains paths which don't need to be authenticated.
|
||||
_unprotectedPathPrefixes = [...]string{
|
||||
"/files",
|
||||
"/data",
|
||||
"/s/",
|
||||
"/settings",
|
||||
"/user-management",
|
||||
"/.well-known",
|
||||
|
||||
@@ -34,10 +34,10 @@ func (a PublicShareAuthenticator) Authenticate(r *http.Request) (*http.Request,
|
||||
shareToken = query.Get(headerShareToken)
|
||||
}
|
||||
|
||||
// Currently we only want to authenticate app open request coming from public shares.
|
||||
if shareToken == "" {
|
||||
// Don't authenticate
|
||||
return nil, false
|
||||
// If the share token is not set then we don't need to inject the user to
|
||||
// the request context so we can just continue with the request.
|
||||
return r, true
|
||||
}
|
||||
|
||||
var sharePassword string
|
||||
|
||||
Reference in New Issue
Block a user