summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjosh4trunks <joshruehlig@gmail.com>2014-03-24 18:46:42 -0700
committerjosh4trunks <joshruehlig@gmail.com>2014-04-03 22:12:57 -0700
commita2661447504cbbf00d9f0b32159fa7311dcbc479 (patch)
treec09e149f10f671139af7f217bcef9cd2fc5ce897
parentd1106f17491e3a0da623f9b325e2eaf3aa4af491 (diff)
downloadnextcloud-server-a2661447504cbbf00d9f0b32159fa7311dcbc479.tar.gz
nextcloud-server-a2661447504cbbf00d9f0b32159fa7311dcbc479.zip
Don't always $cookie_path, only set it when needed
-rw-r--r--lib/base.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index e86894ef290..819e22d96fe 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -741,13 +741,12 @@ class OC {
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
}
if (isset($_SERVER['PHP_AUTH_USER'])) {
- $cookie_path = OC::$WEBROOT ? : '/';
if (isset($_COOKIE['oc_ignore_php_auth_user'])) {
// Ignore HTTP Authentication for 5 more mintues.
- setcookie('oc_ignore_php_auth_user', $_SERVER['PHP_AUTH_USER'], time() + 300, $cookie_path);
+ setcookie('oc_ignore_php_auth_user', $_SERVER['PHP_AUTH_USER'], time() + 300, OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
} elseif ($_SERVER['PHP_AUTH_USER'] === self::$session->get('loginname')) {
// Ignore HTTP Aunthentication to allow a different user to log in.
- setcookie('oc_ignore_php_auth_user', $_SERVER['PHP_AUTH_USER'], 0, $cookie_path);
+ setcookie('oc_ignore_php_auth_user', $_SERVER['PHP_AUTH_USER'], 0, OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
}
}
OC_User::logout();