summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-02-26 18:06:13 +0100
committerkondou <kondou@ts.unde.re>2014-02-26 18:06:13 +0100
commitda19109f403d4d41a417181f5e1de67972334bad (patch)
tree10a6830d406627d4e0c8285e3eeb97e34a0a9f31 /lib
parent7f05c23231b7f77ccc155cdc229e1ae21267e0e5 (diff)
downloadnextcloud-server-da19109f403d4d41a417181f5e1de67972334bad.tar.gz
nextcloud-server-da19109f403d4d41a417181f5e1de67972334bad.zip
Config to disable basic_auth username chacking
This can be confusing and/or annoying
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 49cbb1279d1..351b91b7dfa 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -554,7 +554,8 @@ class OC {
OC_User::useBackend(new OC_User_Database());
OC_Group::useBackend(new OC_Group_Database());
- if (isset($_SERVER['PHP_AUTH_USER']) && self::$session->exists('loginname')
+ $basic_auth = OC_Config::getValue('basic_auth', true);
+ if ($basic_auth && isset($_SERVER['PHP_AUTH_USER']) && self::$session->exists('loginname')
&& $_SERVER['PHP_AUTH_USER'] !== self::$session->get('loginname')) {
$sessionUser = self::$session->get('loginname');
$serverUser = $_SERVER['PHP_AUTH_USER'];