From a41b16d06ad6c4fe555d72165aca7b3e53b2a011 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 24 Oct 2016 23:22:00 +0700 Subject: [ticket/14830] Fix FORM_INVALID error on cpf settings changing PHPBB3-14830 --- phpBB/includes/acp/acp_profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/acp/acp_profile.php') diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 485f849f51..f796900bf0 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -597,7 +597,7 @@ class acp_profile if (!sizeof($error)) { - if (!check_form_key($form_key)) + if (($submit || $save) && !check_form_key($form_key)) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } -- cgit v1.2.1 From 466bdee8e6652ae5594b503b264ea075204e48b6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 15 Oct 2016 12:49:51 +0200 Subject: [ticket/14823] Move check_form_key() inside actual save data step PHPBB3-14823 --- phpBB/includes/acp/acp_profile.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/acp/acp_profile.php') diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index f796900bf0..2012d3c513 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -597,13 +597,13 @@ class acp_profile if (!sizeof($error)) { - if (($submit || $save) && !check_form_key($form_key)) - { - 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)) { + if (!check_form_key($form_key)) + { + trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $this->save_profile_field($cp, $field_type, $action); } } -- cgit v1.2.1