summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-06-20 19:46:10 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-06-20 19:46:10 +0200
commit2f87fb6b456fd109c90a5093c31b7a3f62a32040 (patch)
treef79268ca6d160027fde21b9643789ec2ca31bcc2 /tests
parent60edf2f18ab40439e2efb1d20e594f2797b6f31b (diff)
downloadnextcloud-server-2f87fb6b456fd109c90a5093c31b7a3f62a32040.tar.gz
nextcloud-server-2f87fb6b456fd109c90a5093c31b7a3f62a32040.zip
Add Clear-Site-Data header
This adds a Clear-Site-Data header to the logout response which will delete all relevant data in the caches which may contain potentially sensitive content. See https://w3c.github.io/webappsec-clear-site-data/#header for the definition of the types. Ref https://twitter.com/mikewest/status/877149667909406723 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LoginControllerTest.php2
1 files changed, 2 insertions, 0 deletions
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());
}