summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-21 23:21:28 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-02-18 22:22:12 +0100
commit78842d29b380832490846b1202094c05b0f20a97 (patch)
treeae9f8a38a156207fc87ce27925622d43dfa4948f /core/Controller
parentefe0b3e55ce2d2b11d274f3a894fd7a06312a814 (diff)
downloadnextcloud-server-78842d29b380832490846b1202094c05b0f20a97.tar.gz
nextcloud-server-78842d29b380832490846b1202094c05b0f20a97.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.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 64899304d78..f83b03bc908 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -131,6 +131,8 @@ class LoginController extends Controller {
$this->userSession->logout();
$response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
+ $this->session->set('clearingExecutionContexts', '1');
+ $this->session->close();
$response->addHeader('Clear-Site-Data', '"cache", "storage", "executionContexts"');
return $response;
}
@@ -146,7 +148,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());
}