]> source.dussan.org Git - nextcloud-server.git/commitdiff
refactor(AppFramework): Improve strict and lax cookie checks
authorprovokateurin <kate@provokateurin.de>
Thu, 14 Mar 2024 11:46:23 +0000 (12:46 +0100)
committerprovokateurin <kate@provokateurin.de>
Sun, 5 May 2024 06:32:40 +0000 (08:32 +0200)
Signed-off-by: provokateurin <kate@provokateurin.de>
lib/private/AppFramework/Http/Request.php

index af3993df8bddc256ba05c7f621fba1cefcd6db4d..36dec2e1d7c48490870d5a45054c197670242183 100644 (file)
@@ -532,11 +532,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
                }
 
                $cookieName = $this->getProtectedCookieName('nc_sameSiteCookiestrict');
-               if ($this->getCookie($cookieName) === 'true'
-                       && $this->passesLaxCookieCheck()) {
-                       return true;
-               }
-               return false;
+               return $this->getCookie($cookieName) === 'true' && $this->passesLaxCookieCheck();
        }
 
        /**
@@ -552,10 +548,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
                }
 
                $cookieName = $this->getProtectedCookieName('nc_sameSiteCookielax');
-               if ($this->getCookie($cookieName) === 'true') {
-                       return true;
-               }
-               return false;
+               return $this->getCookie($cookieName) === 'true';
        }