Vergleich inc/datahandlers/login.php - 1.8.11 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 71Zeile 71
			{
$mybb->cookies['loginattempts'] = 0;
}

			{
$mybb->cookies['loginattempts'] = 0;
}

			if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))

			if($mybb->settings['failedcaptchalogincount'] > 0 && (isset($user['loginattempts']) && $user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))

			{
$this->captcha_verified = false;
$this->verify_captcha();

			{
$this->captcha_verified = false;
$this->verify_captcha();

Zeile 128Zeile 128
	{
$this->get_login_data();


	{
$this->get_login_data();


		if(!$this->login_data['uid'])

		if(empty($this->login_data) || !$this->login_data['uid'])

		{
$this->invalid_combination();
return false;

		{
$this->invalid_combination();
return false;

Zeile 171Zeile 171

if($strict == true)
{


if($strict == true)
{

			if(!$this->login_data['salt'])
{
// Generate a salt for this user and assume the password stored in db is a plain md5 password
$password_fields = create_password($this->login_data['password']);
$this->login_data = array_merge($this->login_data, $password_fields);
$db->update_query("users", $password_fields, "uid = '{$this->login_data['uid']}'");
}


 
			if(!$this->login_data['loginkey'])
{
$this->login_data['loginkey'] = generate_loginkey();

			if(!$this->login_data['loginkey'])
{
$this->login_data['loginkey'] = generate_loginkey();

Zeile 190Zeile 182
				$db->update_query("users", $sql_array, "uid = '{$this->login_data['uid']}'");
}
}

				$db->update_query("users", $sql_array, "uid = '{$this->login_data['uid']}'");
}
}





		$plugins->run_hooks('datahandler_login_verify_password_end', $args);

if(!verify_user_password($this->login_data, $user['password']))
{
$this->invalid_combination(true);

		$plugins->run_hooks('datahandler_login_verify_password_end', $args);

if(!verify_user_password($this->login_data, $user['password']))
{
$this->invalid_combination(true);

			return false;
}


			return false;
}


		return true;
}


		return true;
}


Zeile 208Zeile 200
	function invalid_combination($show_login_attempts = false)
{
global $db, $lang, $mybb;

	function invalid_combination($show_login_attempts = false)
{
global $db, $lang, $mybb;





		// Don't show an error when the captcha was wrong!
if(!$this->captcha_verified)
{
return;

		// Don't show an error when the captcha was wrong!
if(!$this->captcha_verified)
{
return;

		}


		}


		$login_text = '';
if($show_login_attempts)
{

		$login_text = '';
if($show_login_attempts)
{

			if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)

			if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1 && $this->login_data['uid'] != 0)

			{

			{

				$logins = login_attempt_check(false) + 1;

				$logins = login_attempt_check($this->login_data['uid'], false) + 1;

				$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
}

				$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
}

Zeile 251Zeile 243
		);

if($this->username_method !== null)

		);

if($this->username_method !== null)

		{

		{

			$options['username_method'] = (int)$this->username_method;
}


			$options['username_method'] = (int)$this->username_method;
}


Zeile 305Zeile 297
		$user = &$this->login_data;

$plugins->run_hooks('datahandler_login_complete_start', $this);

		$user = &$this->login_data;

$plugins->run_hooks('datahandler_login_complete_start', $this);





		// Login to MyBB
my_setcookie('loginattempts', 1);
my_setcookie("sid", $session->sid, -1, true);

		// Login to MyBB
my_setcookie('loginattempts', 1);
my_setcookie("sid", $session->sid, -1, true);


$ip_address = $db->escape_binary($session->packedip);
$db->delete_query("sessions", "ip = {$ip_address} AND sid != '{$session->sid}'");

 

$newsession = array(
"uid" => $user['uid'],


$newsession = array(
"uid" => $user['uid'],

Zeile 326Zeile 315
			$remember = -1;
}


			$remember = -1;
}


		my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true);


		my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true, "lax");


		if($this->captcha !== false)
{
$this->captcha->invalidate_captcha();

		if($this->captcha !== false)
{
$this->captcha->invalidate_captcha();