diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/base.php b/lib/base.php index b5c12a683ff..ea5adbadc9d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -417,7 +417,7 @@ class OC { } self::initPaths(); - OC_Util::issetlocaleworking(); + OC_Util::isSetLocaleWorking(); // set debug mode if an xdebug session is active if (!defined('DEBUG') || !DEBUG) { @@ -529,7 +529,7 @@ class OC { } // write error into log if locale can't be set - if (OC_Util::issetlocaleworking() == false) { + if (OC_Util::isSetLocaleWorking() == false) { OC_Log::write('core', 'setting locale to en_US.UTF-8/en_US.UTF8 failed. Support is probably not installed on your system', OC_Log::ERROR); @@ -768,7 +768,7 @@ class OC { if (in_array($_COOKIE['oc_token'], $tokens, true)) { // replace successfully used token with a new one OC_Preferences::deleteKey($_COOKIE['oc_username'], 'login_token', $_COOKIE['oc_token']); - $token = OC_Util::generate_random_bytes(32); + $token = OC_Util::generateRandomBytes(32); OC_Preferences::setValue($_COOKIE['oc_username'], 'login_token', $token, time()); OC_User::setMagicInCookie($_COOKIE['oc_username'], $token); // login @@ -808,7 +808,7 @@ class OC { if (defined("DEBUG") && DEBUG) { OC_Log::write('core', 'Setting remember login to cookie', OC_Log::DEBUG); } - $token = OC_Util::generate_random_bytes(32); + $token = OC_Util::generateRandomBytes(32); OC_Preferences::setValue($userid, 'login_token', $token, time()); OC_User::setMagicInCookie($userid, $token); } else { @@ -826,16 +826,11 @@ class OC { ) { return false; } - // don't redo authentication if user is already logged in - // otherwise session would be invalidated in OC_User::login with - // session_regenerate_id at every page load - if (!OC_User::isLoggedIn()) { - OC_App::loadApps(array('authentication')); - 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(); - } + OC_App::loadApps(array('authentication')); + 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; } |