summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-18 14:40:42 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-18 14:40:42 +0200
commitf0bf46b0809b9c301b25662f58c9ff76f369941c (patch)
tree0b1f64bf4c3669d17f6adacab3708dc44760c3f2 /lib
parentc89c6ed21de96be58793c0e63c39aa0897253450 (diff)
parentc19bc1917b1db7553bc011b15c4dc5354c41a52f (diff)
downloadnextcloud-server-f0bf46b0809b9c301b25662f58c9ff76f369941c.tar.gz
nextcloud-server-f0bf46b0809b9c301b25662f58c9ff76f369941c.zip
Merge pull request #11130 from owncloud/moveBasicAuthCheck
Move basic auth check
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/base.php b/lib/base.php
index e21d0124b32..76e0b9cf670 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -710,15 +710,6 @@ class OC {
self::checkUpgrade();
}
- if (!OC_User::isLoggedIn()) {
- // Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
- if (!OC_Config::getValue('maintenance', false) && !self::checkUpgrade(false)) {
- OC_App::loadApps(array('authentication'));
- }
- OC::tryBasicAuthLogin();
- }
-
-
if (!self::$CLI and (!isset($_GET["logout"]) or ($_GET["logout"] !== 'true'))) {
try {
if (!OC_Config::getValue('maintenance', false) && !\OCP\Util::needUpgrade()) {
@@ -842,8 +833,9 @@ class OC {
} // remember was checked after last login
elseif (OC::tryRememberLogin()) {
$error[] = 'invalidcookie';
- } // logon via web form
- elseif (OC::tryFormLogin()) {
+ } // logon via web form or WebDAV
+ elseif (OC::tryFormLogin()) {}
+ elseif (OC::tryBasicAuthLogin()) {
$error[] = 'invalidpassword';
}
@@ -974,10 +966,10 @@ class OC {
}
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
- //OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie();
$_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister();
}
+
return true;
}