diff --git a/lib/private/Session/CryptoWrapper.php b/lib/private/Session/CryptoWrapper.php index 31b16d9fcb7d..04c24ab8cc47 100644 --- a/lib/private/Session/CryptoWrapper.php +++ b/lib/private/Session/CryptoWrapper.php @@ -89,7 +89,16 @@ public function __construct(IConfig $config, if ($webRoot === '') { $webRoot = '/'; } - \setcookie(self::COOKIE_NAME, $this->passphrase, 0, $webRoot, '', $secureCookie, true); + $options = [ + "expires" => 0, + "path" => $webRoot, + "domain" => '', + "secure" => $secureCookie, + "httponly" => true, + "samesite" => 'strict' + ]; + + \setcookie(self::COOKIE_NAME, $this->passphrase, $options); } } }