diff options
author | Louis <louis@chmn.me> | 2024-01-08 10:49:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 10:49:49 +0100 |
commit | d2f2ee2b206f3f06ffdeb9de356fb859b873ffdc (patch) | |
tree | 2af52736840aa8847b20702aa3e84c685f987450 /core | |
parent | ab2bb2be6183d58f6851bed412ff98cc87bf5a2d (diff) | |
parent | 08ff644f3cba2723324dd4c01adf1bfad66d01b0 (diff) | |
download | nextcloud-server-d2f2ee2b206f3f06ffdeb9de356fb859b873ffdc.tar.gz nextcloud-server-d2f2ee2b206f3f06ffdeb9de356fb859b873ffdc.zip |
Merge pull request #42544 from HLFH/fix-chrome-logout
Fix Slow logout on Chrome-like browsers
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/LoginController.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index db3e8a64d64..a1e2b08ab21 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -35,6 +35,7 @@ declare(strict_types=1); */ namespace OC\Core\Controller; +use OC\AppFramework\Http\Request; use OC\Authentication\Login\Chain; use OC\Authentication\Login\LoginData; use OC\Authentication\WebAuthn\Manager as WebAuthnManager; @@ -105,8 +106,10 @@ class LoginController extends Controller { $this->session->set('clearingExecutionContexts', '1'); $this->session->close(); - if ($this->request->getServerProtocol() === 'https') { - // This feature is available only in secure contexts + if ( + $this->request->getServerProtocol() === 'https' && + !$this->request->isUserAgent([Request::USER_AGENT_CHROME, Request::USER_AGENT_ANDROID_MOBILE_CHROME]) + ) { $response->addHeader('Clear-Site-Data', '"cache", "storage"'); } |