From 2f87fb6b456fd109c90a5093c31b7a3f62a32040 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 20 Jun 2017 19:46:10 +0200 Subject: 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 --- core/Controller/LoginController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') 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; } /** -- cgit v1.2.3