diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-06-29 13:32:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-29 13:32:46 +0200 |
commit | 57c5a15e418dac9491403aba8266a97b7fadc064 (patch) | |
tree | 726aa2741fc6c56d23186f37e31c58c7798f6fd5 | |
parent | 4a9277d8da12efa3abf03cc92c17dfa4ca964160 (diff) | |
parent | 2f87fb6b456fd109c90a5093c31b7a3f62a32040 (diff) | |
download | nextcloud-server-57c5a15e418dac9491403aba8266a97b7fadc064.tar.gz nextcloud-server-57c5a15e418dac9491403aba8266a97b7fadc064.zip |
Merge pull request #5490 from nextcloud/add-clear-site-data-header
Add Clear-Site-Data header
-rw-r--r-- | core/Controller/LoginController.php | 4 | ||||
-rw-r--r-- | tests/Core/Controller/LoginControllerTest.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 93b695dd999..1c75b1f3c8b 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -107,7 +107,9 @@ class LoginController extends Controller { } $this->userSession->logout(); - return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); + $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); + $response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); + return $response; } /** diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index ca32a04efe1..bd2d0143caf 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -95,6 +95,7 @@ class LoginControllerTest extends TestCase { ->willReturn('/login'); $expected = new RedirectResponse('/login'); + $expected->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); $this->assertEquals($expected, $this->loginController->logout()); } @@ -124,6 +125,7 @@ class LoginControllerTest extends TestCase { ->willReturn('/login'); $expected = new RedirectResponse('/login'); + $expected->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); $this->assertEquals($expected, $this->loginController->logout()); } |