diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-14 14:56:45 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-14 14:56:45 -0700 |
commit | 6f5b0af67f2de920b2ab519fc53139d93d7e03cb (patch) | |
tree | 5bd01ac8bdf59add0f83fc8a916d75d4d1b1b552 | |
parent | 7cc22443e3c8d9196baa23eeca39e317281d46fb (diff) | |
parent | 9cd6645037dc802fc0e1bc87ac8fdce76243f09d (diff) | |
download | nextcloud-server-6f5b0af67f2de920b2ab519fc53139d93d7e03cb.tar.gz nextcloud-server-6f5b0af67f2de920b2ab519fc53139d93d7e03cb.zip |
Merge pull request #3487 from owncloud/basic_auth_hack
Basic Auth is broken - again...
-rw-r--r-- | lib/base.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php index d1279a46337..14754a00161 100644 --- a/lib/base.php +++ b/lib/base.php @@ -598,6 +598,9 @@ class OC { self::checkUpgrade(); } + // Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP + OC::tryBasicAuthLogin(); + if (!self::$CLI) { try { if (!OC_Config::getValue('maintenance', false)) { @@ -699,15 +702,11 @@ class OC { // remember was checked after last login if (OC::tryRememberLogin()) { $error[] = 'invalidcookie'; - // Someone wants to log in : } elseif (OC::tryFormLogin()) { $error[] = 'invalidpassword'; - - // The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP - } elseif (OC::tryBasicAuthLogin()) { - $error[] = 'invalidpassword'; } + OC_Util::displayLoginPage(array_unique($error)); } @@ -805,8 +804,7 @@ 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(); - $_REQUEST['redirect_url'] = OC_Request::requestUri(); - OC_Util::redirectToDefaultPage(); + $_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister(); } return true; } |