mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-01 12:05:37 +02:00
[ticket/14789] Remove obsolete check_form_key() and add missing hashes
PHPBB3-14789
This commit is contained in:
parent
88d7c4fe57
commit
4e5f29a21b
@ -233,11 +233,6 @@ class acp_database
|
|||||||
$file = request_var('file', '');
|
$file = request_var('file', '');
|
||||||
$download = request_var('download', '');
|
$download = request_var('download', '');
|
||||||
|
|
||||||
if (!check_form_key($form_key))
|
|
||||||
{
|
|
||||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
|
@ -2274,6 +2274,12 @@ class acp_users
|
|||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!check_link_hash($request->variable('hash', ''), 'acp_users'))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
group_user_attributes($action, $group_id, $user_id);
|
group_user_attributes($action, $group_id, $user_id);
|
||||||
|
|
||||||
if ($action == 'default')
|
if ($action == 'default')
|
||||||
@ -2431,8 +2437,8 @@ class acp_users
|
|||||||
{
|
{
|
||||||
$template->assign_block_vars('group', array(
|
$template->assign_block_vars('group', array(
|
||||||
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"),
|
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"),
|
||||||
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'],
|
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||||
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'],
|
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||||
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
||||||
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user