[ticket/14823] Move check_form_key() inside actual save data step

PHPBB3-14823
This commit is contained in:
Marc Alexander 2016-10-15 12:49:51 +02:00 committed by rxu
parent a41b16d06a
commit 466bdee8e6

View file

@ -597,13 +597,13 @@ class acp_profile
if (!sizeof($error)) if (!sizeof($error))
{ {
if (($submit || $save) && !check_form_key($form_key)) if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
{
if (!check_form_key($form_key))
{ {
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
} }
if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
{
$this->save_profile_field($cp, $field_type, $action); $this->save_profile_field($cp, $field_type, $action);
} }
} }