summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/base.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index ff9dd1ad1eb..39e0249477b 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -641,7 +641,8 @@ class OC {
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
}
OC_User::logout();
- header("Location: " . OC::$WEBROOT);
+ // redirect to webroot and add slash if webroot is empty
+ header("Location: " . OC::$WEBROOT.(empty(OC::$WEBROOT) ? '/' : ''));
} else {
if (is_null($file)) {
$param['file'] = 'index.php';