aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_users.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-09-30 23:26:04 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-09-30 23:26:04 +0100
commit4e5f29a21b79f58864669e0d1a62fa8287e11720 (patch)
treebb6c794f5fb28c6a6adb52d2e930a64e537fdd02 /phpBB/includes/acp/acp_users.php
parent88d7c4fe57eb0255c6c5cb434f3a3aaa0f6e726c (diff)
downloadforums-4e5f29a21b79f58864669e0d1a62fa8287e11720.tar
forums-4e5f29a21b79f58864669e0d1a62fa8287e11720.tar.gz
forums-4e5f29a21b79f58864669e0d1a62fa8287e11720.tar.bz2
forums-4e5f29a21b79f58864669e0d1a62fa8287e11720.tar.xz
forums-4e5f29a21b79f58864669e0d1a62fa8287e11720.zip
[ticket/14789] Remove obsolete check_form_key() and add missing hashes
PHPBB3-14789
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r--phpBB/includes/acp/acp_users.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 1ea266815d..1e453e88ad 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2274,6 +2274,12 @@ class acp_users
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;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);
if ($action == 'default')
@@ -2431,8 +2437,8 @@ class acp_users
{
$template->assign_block_vars('group', array(
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&amp;mode=manage&amp;action=edit&amp;u=$user_id&amp;g={$data['group_id']}&amp;back_link=acp_users_groups"),
- 'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'],
- 'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'],
+ 'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
+ 'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'],
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&amp;action=approve&amp;u=$user_id&amp;g=" . $data['group_id'] : '',