Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-08-07 23:19:03 +0400
committerThomas Tanghus <thomas@tanghus.net>2013-08-07 23:19:03 +0400
commit201557cf136999c6b5d3c91ca56b8f28edaae980 (patch)
treeb819f2f03102a5e934101c7fecf5be18703a43b8 /lib/base.php
parent248e7a06927e8521cb7f76a7489cabb271e93049 (diff)
Backport #3487 Basic Auth fix
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/base.php b/lib/base.php
index 9a59e63dc45..93ecb9d1aa6 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -609,6 +609,9 @@ class OC {
self::checkUpgrade();
}
+ // Test if 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)) {
@@ -714,10 +717,6 @@ class OC {
// 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));
}
@@ -816,8 +815,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;
}