summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-04-06 00:16:52 +0200
committerLukas Reschke <lukas@statuscode.ch>2013-04-06 00:16:52 +0200
commitfbffbe0170d4a47cdefaaf99a3dfa4008de0f886 (patch)
treeee02b87e4038ab27170970df223832b65adbc1b0 /lib/base.php
parent6798b6dc349e8754c4a5bf13b6ac7530bf12e931 (diff)
downloadnextcloud-server-fbffbe0170d4a47cdefaaf99a3dfa4008de0f886.tar.gz
nextcloud-server-fbffbe0170d4a47cdefaaf99a3dfa4008de0f886.zip
Juse send the cookies in the ownCloud directory
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 76ad0654ed0..dde994a7e57 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -323,6 +323,9 @@ class OC {
// prevents javascript from accessing php session cookies
ini_set('session.cookie_httponly', '1;');
+ // set the cookie path to the ownCloud directory
+ ini_set('session.cookie_path', OC::$WEBROOT);
+
// set the session name to the instance id - which is unique
session_name(OC_Util::getInstanceId());
@@ -354,7 +357,7 @@ class OC {
// session timeout
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 60*60*24)) {
if (isset($_COOKIE[session_name()])) {
- setcookie(session_name(), '', time() - 42000, '/');
+ setcookie(session_name(), '', time() - 42000, OC::$WEBROOT);
}
session_unset();
session_destroy();