diff --git a/lib/private/session/cryptowrapper.php b/lib/private/session/cryptowrapper.php index 62bdcbfb719e..261514d683e7 100644 --- a/lib/private/session/cryptowrapper.php +++ b/lib/private/session/cryptowrapper.php @@ -77,7 +77,11 @@ public function __construct(IConfig $config, $secureCookie = $request->getServerProtocol() === 'https'; // FIXME: Required for CI if (!defined('PHPUNIT_RUN')) { - setcookie(self::COOKIE_NAME, $this->passphrase, 0, \OC::$WEBROOT, '', $secureCookie, true); + $webRoot = \OC::$WEBROOT; + if($webRoot === '') { + $webRoot = '/'; + } + setcookie(self::COOKIE_NAME, $this->passphrase, 0, $webRoot, '', $secureCookie, true); } } }