Merge pull request #19010 from owncloud/use-proper-web-root

Use / instead of an empty string as cookie path
This commit is contained in:
Thomas Müller 2015-09-14 12:14:46 +02:00
commit 341b733dec
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
}