summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-09-27 15:31:30 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-09-27 15:31:30 +0200
commitbf3248bee9d3903cc40b4271215a3e537b68ac34 (patch)
tree3f88858223cd64478160eb3c1a8f7bf60c9b8d07 /index.php
parent83ccbbe49f1e44da8d3abdfa7668af527c60c530 (diff)
downloadnextcloud-server-bf3248bee9d3903cc40b4271215a3e537b68ac34.tar.gz
nextcloud-server-bf3248bee9d3903cc40b4271215a3e537b68ac34.zip
remove warning by check cookie before accessing it.
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 63ffba135ae..2ac3f6df7bb 100644
--- a/index.php
+++ b/index.php
@@ -57,7 +57,7 @@ elseif(isset($_COOKIE["oc_remember_login"]) && $_COOKIE["oc_remember_login"]) {
OC_App::loadApps();
if(defined("DEBUG") && DEBUG) {error_log("Trying to login from cookie");}
// confirm credentials in cookie
- if(OC_User::userExists($_COOKIE['oc_username']) &&
+ if(isset($_COOKIE['oc_token']) && OC_User::userExists($_COOKIE['oc_username']) &&
OC_Preferences::getValue($_COOKIE['oc_username'], "login", "token") == $_COOKIE['oc_token']) {
OC_User::setUserId($_COOKIE['oc_username']);
OC_Util::redirectToDefaultPage();