diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-21 23:21:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-06 11:29:32 +0100 |
commit | 60e5a5eca42f3b10053c423e4aedef9e09f2c48c (patch) | |
tree | ee39fabedb0c8da52d8925e061ed888e8b1b91bf /core/Controller | |
parent | 780e1485c85bf31f1bae9221436798f25810fc72 (diff) | |
download | nextcloud-server-60e5a5eca42f3b10053c423e4aedef9e09f2c48c.tar.gz nextcloud-server-60e5a5eca42f3b10053c423e4aedef9e09f2c48c.zip |
Do not do redirect handling when loggin out
Fixes #12568
Since the clearing of the execution context causes another reload. We
should not do the redirect_uri handling as this results in redirecting
back to the logout page on login.
This adds a simple middleware that will just check if the
ClearExecutionContext session variable is set. If that is the case it
will just redirect back to the login page.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/LoginController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 5697430051f..85d3b6b837f 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -134,6 +134,9 @@ class LoginController extends Controller { 'core.login.showLoginForm', ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers )); + + $this->session->set('clearingExecutionContexts', '1'); + $this->session->close(); $response->addHeader('Clear-Site-Data', '"cache", "storage", "executionContexts"'); return $response; } @@ -149,7 +152,6 @@ class LoginController extends Controller { * @return TemplateResponse|RedirectResponse */ public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response { - if ($this->userSession->isLoggedIn()) { return new RedirectResponse(OC_Util::getDefaultPageUrl()); } |