Merge pull request #19010 from owncloud/use-proper-web-root
Use / instead of an empty string as cookie path
This commit is contained in:
commit
341b733dec
|
@ -77,7 +77,11 @@ class CryptoWrapper {
|
|||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue