diff options
author | Tristan Darricau <github@nicofuma.fr> | 2016-09-18 21:14:47 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2016-09-18 21:14:47 +0200 |
commit | 19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86 (patch) | |
tree | c6ee9901bdf6f8bd405d3bcd563a9cab8d8a7392 /phpBB/includes/acp/acp_language.php | |
parent | 47d2f34a1b9008332bcd27d5e855f1fc05ff1ab2 (diff) | |
parent | bc08813866a4496b88777a5d152f601ac521fef1 (diff) | |
download | forums-19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86.tar forums-19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86.tar.gz forums-19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86.tar.bz2 forums-19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86.tar.xz forums-19bbbfe0f3e9898f2ee8d8d392ecf2584dafce86.zip |
Merge branch '3.1.x' into 3.2.x
* 3.1.x:
[ticket/14789] Add form tokens to tests and uncomment add_form_key
[ticket/14789] Add link hashes and form tokens to all acp links/buttons
Diffstat (limited to 'phpBB/includes/acp/acp_language.php')
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 03172e475a..4baff921b6 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -244,6 +244,11 @@ class acp_language break; case 'install': + if (!check_link_hash($request->variable('hash', ''), 'acp_language')) + { + trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $lang_iso = $request->variable('iso', ''); $lang_iso = basename($lang_iso); @@ -405,7 +410,7 @@ class acp_language 'ISO' => htmlspecialchars($lang_ary['iso']), 'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'), 'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'), - 'U_INSTALL' => $this->u_action . '&action=install&iso=' . urlencode($lang_ary['iso'])) + 'U_INSTALL' => $this->u_action . '&action=install&iso=' . urlencode($lang_ary['iso']) . '&hash=' . generate_link_hash('acp_language')) ); } } |