From 9a2511fe9bd5716c49bc8a28cbea690f9bb0fe97 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 20 Sep 2016 01:15:06 +0200 Subject: [PATCH] Don't check for Same-Site cookie on Chrome Android Chrome on Android has a bug that it doesn't sent cookies with the same-site attribute for the download manager. To work around that all same-site cookies get deleted and recreated directly. Awesome! FIXME: Remove once Chrome 54 is deployed to end-users @see https://github.com/nextcloud/server/pull/1454 --- lib/base.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/base.php b/lib/base.php index b2e45595a3e..7d86245818d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -520,6 +520,14 @@ class OC { return; } + // Chrome on Android has a bug that it doesn't sent cookies with the + // same-site attribute for the download manager. To work around that + // all same-site cookies get deleted and recreated directly. Awesome! + // FIXME: Remove once Chrome 54 is deployed to end-users + // @see https://github.com/nextcloud/server/pull/1454 + if($request->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME])) { + return; + } if(count($_COOKIE) > 0) { $requestUri = $request->getScriptName();