mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
Fix basic auth for OAuth token endpoint
Don't try to login when a client is trying to get a OAuth token. OAuth needs to support basic auth too, so the login is not valid inside Nextcloud and the Login exception would ruin it. Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
f7b3d521f8
commit
03936d7762
1 changed files with 7 additions and 1 deletions
|
|
@ -987,7 +987,13 @@ class OC {
|
|||
} else {
|
||||
// For guests: Load only filesystem and logging
|
||||
OC_App::loadApps(['filesystem', 'logging']);
|
||||
self::handleLogin($request);
|
||||
|
||||
// Don't try to login when a client is trying to get a OAuth token.
|
||||
// OAuth needs to support basic auth too, so the login is not valid
|
||||
// inside Nextcloud and the Login exception would ruin it.
|
||||
if ($request->getRawPathInfo() !== '/apps/oauth2/api/v1/token') {
|
||||
self::handleLogin($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue