From ef61deb132c16270462aae2fe30f7d5b2f751577 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 9 Sep 2014 19:49:17 +0200 Subject: [PATCH] [ticket/13052] Use request class instead of $_POST and request_var() PHPBB3-13052 --- phpBB/includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f7ee2c44ab..7eca3e7ef6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2584,15 +2584,15 @@ function add_form_key($form_name) */ function check_form_key($form_name) { - global $config, $user; + global $config, $request, $user; // we enforce a minimum value of half a minute here. $timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']); - if (isset($_POST['creation_time']) && isset($_POST['form_token'])) + if ($request->is_set_post('creation_time') && $request->is_set_post('form_token')) { - $creation_time = abs(request_var('creation_time', 0)); - $token = request_var('form_token', ''); + $creation_time = abs($request->variable('creation_time', 0)); + $token = $request->variable('form_token', ''); $diff = time() - $creation_time;