Vergleich admin/index.php - 1.8.29 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 108Zeile 108
	{
$user = get_user_by_username($mybb->input['username'], array('fields' => '*'));


	{
$user = get_user_by_username($mybb->input['username'], array('fields' => '*'));


		if(!$user['uid'])

		if(!$user)

		{
$error = $lang->error_invalid_username;
}

		{
$error = $lang->error_invalid_username;
}

Zeile 116Zeile 116
	else if($mybb->input['uid'])
{
$user = get_user($mybb->input['uid']);

	else if($mybb->input['uid'])
{
$user = get_user($mybb->input['uid']);

		if(!$user['uid'])

		if(!$user)

		{
$error = $lang->error_invalid_uid;
}

		{
$error = $lang->error_invalid_uid;
}

Zeile 296Zeile 296
			$db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'");
}


			$db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'");
}


		my_setcookie("adminsid", $sid, '', true, "lax");

		my_setcookie("adminsid", $sid, '', true, "strict");

		my_setcookie('acploginattempts', 0);
$post_verify = false;


		my_setcookie('acploginattempts', 0);
$post_verify = false;


Zeile 329Zeile 329
				{
$params = explode("=", $param);


				{
$params = explode("=", $param);


					$query_string .= '&'.htmlspecialchars_uni($params[0])."=".htmlspecialchars_uni($params[1]);






					$query_string .= '&'.htmlspecialchars_uni($params[0]);

if(isset($params[1]))
{
$query_string .= "=".htmlspecialchars_uni($params[1]);
}

				}
}


				}
}


Zeile 339Zeile 344
	else
{
$login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username')));

	else
{
$login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username')));





		$plugins->run_hooks("admin_login_fail");

$loginattempts = false;

		$plugins->run_hooks("admin_login_fail");

$loginattempts = false;

Zeile 354Zeile 359
		{
// Have we set an expiry yet?
if($loginattempts['loginlockoutexpiry'] == 0)

		{
// Have we set an expiry yet?
if($loginattempts['loginlockoutexpiry'] == 0)

			{

			{

				$db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'");
}


				$db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'");
}


Zeile 443Zeile 448
							++$matches;
}
if($matches == ADMIN_IP_SEGMENTS)

							++$matches;
}
if($matches == ADMIN_IP_SEGMENTS)

						{
$valid_ip = true;
break;
}
}

// IP doesn't match properly - show message on logon screen
if(!$valid_ip)
{
$login_message = $lang->error_invalid_ip;
unset($mybb->user);
}

						{
$valid_ip = true;
break;
}
}

// IP doesn't match properly - show message on logon screen
if(!$valid_ip)
{
$login_message = $lang->error_invalid_ip;
unset($mybb->user);
}

				}
else if(ADMIN_IPV6_SEGMENTS > 0 && strpos($ip_address, ':') !== false)
{

				}
else if(ADMIN_IPV6_SEGMENTS > 0 && strpos($ip_address, ':') !== false)
{

Zeile 473Zeile 478
						if($exploded_ip[$i] == $exploded_admin_ip[$i])
{
++$matches;

						if($exploded_ip[$i] == $exploded_admin_ip[$i])
{
++$matches;

						}

						}

						if($matches == ADMIN_IPV6_SEGMENTS)
{
$valid_ip = true;
break;
}

						if($matches == ADMIN_IPV6_SEGMENTS)
{
$valid_ip = true;
break;
}

					}

					}


// IP doesn't match properly - show message on logon screen
if(!$valid_ip)


// IP doesn't match properly - show message on logon screen
if(!$valid_ip)

Zeile 490Zeile 495
				}
}
}

				}
}
}

	}

	}

}

if($mybb->input['action'] == "logout" && $mybb->user)
{
$plugins->run_hooks("admin_logout");

}

if($mybb->input['action'] == "logout" && $mybb->user)
{
$plugins->run_hooks("admin_logout");





	if(verify_post_check($mybb->get_input('my_post_key')))
{
$db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'");
my_unsetcookie('adminsid');
$logged_out = true;

	if(verify_post_check($mybb->get_input('my_post_key')))
{
$db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'");
my_unsetcookie('adminsid');
$logged_out = true;

	}
}


	}
}


if(!isset($mybb->user['usergroup']))
{
$mybbgroups = 1;

if(!isset($mybb->user['usergroup']))
{
$mybbgroups = 1;

}

}

else
{
$mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];
}
$mybb->usergroup = usergroup_permissions($mybbgroups);

else
{
$mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];
}
$mybb->usergroup = usergroup_permissions($mybbgroups);





$is_super_admin = false;
if(isset($mybb->user['uid']))

$is_super_admin = false;
if(isset($mybb->user['uid']))

{

{

	$is_super_admin = is_super_admin($mybb->user['uid']);
}


	$is_super_admin = is_super_admin($mybb->user['uid']);
}


if($mybb->usergroup['cancp'] != 1 && !$is_super_admin || !$mybb->user['uid'])

if(empty($mybb->usergroup['cancp']) && !$is_super_admin || !$mybb->user['uid'])

{
$uid = 0;
if(isset($mybb->user['uid']))
{
$uid = (int)$mybb->user['uid'];

{
$uid = 0;
if(isset($mybb->user['uid']))
{
$uid = (int)$mybb->user['uid'];

	}

	}

	$db->delete_query("adminsessions", "uid = '{$uid}'");
unset($mybb->user);
my_unsetcookie('adminsid');

	$db->delete_query("adminsessions", "uid = '{$uid}'");
unset($mybb->user);
my_unsetcookie('adminsid');

 
	if($mybb->get_input('do') == 'login')
{
$login_message = $lang->error_mybb_not_admin_account;
}

}

if(!empty($mybb->user['uid']))

}

if(!empty($mybb->user['uid']))