diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-11-14 20:39:57 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-11-14 20:39:57 +0100 |
commit | 0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902 (patch) | |
tree | 5dc02515137ba4e34288197188e558a3793eb3f7 | |
parent | 04204c7ec6ecb2572cb41727140ae7c7644a4c63 (diff) | |
parent | dba351702dbcd2dd157e8429199609fa27beee7d (diff) | |
download | forums-0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902.tar forums-0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902.tar.gz forums-0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902.tar.bz2 forums-0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902.tar.xz forums-0641c209d73d56cbbb00e7f8bc4b64c8a0c9f902.zip |
Merge pull request #5736 from marc1706/ticket/16210
[ticket/16210] Ensure terms of use is not skipped by enforcing form token
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 0e673cb692..54e418d58c 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -45,6 +45,11 @@ class ucp_register $change_lang = $request->variable('change_lang', ''); $user_lang = $request->variable('lang', $user->lang_name); + if ($agreed && !check_form_key('ucp_register')) + { + $agreed = false; + } + /** * Add UCP register data before they are assigned to the template or submitted * @@ -67,14 +72,7 @@ class ucp_register ); extract($phpbb_dispatcher->trigger_event('core.ucp_register_requests_after', compact($vars))); - if ($agreed) - { - add_form_key('ucp_register'); - } - else - { - add_form_key('ucp_register_terms'); - } + add_form_key('ucp_register'); if ($change_lang || $user_lang != $config['default_lang']) { |