[Pkg-owncloud-commits] [owncloud] 86/258: Move basic auth check

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 749c51975943bd3ecf86e193884032e3042e6d40
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Wed Sep 17 16:04:12 2014 +0200

    Move basic auth check
    
    At the previous point not all apps were initialized. Now the basic auth check happens together at the same location as all others.
    
    Fixes https://github.com/owncloud/core/issues/11129
---
 lib/base.php | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/lib/base.php b/lib/base.php
index b1535ff..971ed00 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -684,15 +684,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()) {
@@ -840,8 +831,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';
 		}
 
@@ -972,10 +964,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;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list