diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-09-18 01:14:23 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-09-18 15:29:50 +0200 |
commit | 585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d (patch) | |
tree | e637c7b5d95a901a1af505efd97be44a6eafc05d /phpBB/includes/acp/acp_reasons.php | |
parent | 27e33f39f7553d2f24fdeae004810493f063265d (diff) | |
download | forums-585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d.tar forums-585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d.tar.gz forums-585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d.tar.bz2 forums-585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d.tar.xz forums-585a3ed863c267f36584a3fb9a0cf35f6a2e4c2d.zip |
[ticket/14789] Add link hashes and form tokens to all acp links/buttons
This will further harden the ACP security by adding link hashes to links and
form tokens to forms that did not have these yet and result in modified
settings or write action on the filesystem or database. These few links and
forms were still relying on the global ACP protection, mainly due to them
not posing further risks of compromising data. After this change these will
now also be properly protected against tampering.
PHPBB3-14789
Diffstat (limited to 'phpBB/includes/acp/acp_reasons.php')
-rw-r--r-- | phpBB/includes/acp/acp_reasons.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php index 3d7ccf422c..bd40a88138 100644 --- a/phpBB/includes/acp/acp_reasons.php +++ b/phpBB/includes/acp/acp_reasons.php @@ -282,6 +282,11 @@ class acp_reasons case 'move_up': case 'move_down': + if (!check_link_hash($request->variable('hash', ''), 'acp_reasons')) + { + trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $sql = 'SELECT reason_order FROM ' . REPORTS_REASONS_TABLE . " WHERE reason_id = $reason_id"; @@ -383,8 +388,8 @@ class acp_reasons 'U_EDIT' => $this->u_action . '&action=edit&id=' . $row['reason_id'], 'U_DELETE' => (!$other_reason) ? $this->u_action . '&action=delete&id=' . $row['reason_id'] : '', - 'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row['reason_id'], - 'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row['reason_id']) + 'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row['reason_id'] . '&hash=' . generate_link_hash('acp_reasons'), + 'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row['reason_id'] . '&hash=' . generate_link_hash('acp_reasons')) ); } $db->sql_freeresult($result); |