Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-22 01:21:28 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-02-06 13:29:32 +0300
commit60e5a5eca42f3b10053c423e4aedef9e09f2c48c (patch)
treeee39fabedb0c8da52d8925e061ed888e8b1b91bf /core/Controller
parent780e1485c85bf31f1bae9221436798f25810fc72 (diff)
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.php4
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());
}