aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:21:23 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:21:23 +0000
commit2a3eb724a84120e1d89e56536dcd1f1f5e20a408 (patch)
tree5e7f0f5ef11d65daffe4e514ec5949ea59fa184a /phpBB/includes/functions.php
parent30b24d476c3e010d9b2fc282e89a6fd8d8bdd6fa (diff)
downloadforums-2a3eb724a84120e1d89e56536dcd1f1f5e20a408.tar
forums-2a3eb724a84120e1d89e56536dcd1f1f5e20a408.tar.gz
forums-2a3eb724a84120e1d89e56536dcd1f1f5e20a408.tar.bz2
forums-2a3eb724a84120e1d89e56536dcd1f1f5e20a408.tar.xz
forums-2a3eb724a84120e1d89e56536dcd1f1f5e20a408.zip
cross-ci
git-svn-id: file:///svn/phpbb/trunk@8411 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index b580edb693..2039043264 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1969,7 +1969,7 @@ function add_form_key($form_name)
* @param bool $trigger If true, the function will triger an error when encountering an invalid form
* @param int $minimum_time The minimum acceptable age for a submitted form in seconds
*/
-function check_form_key($form_name, $timespan = false, $return_page = '', $trigger = false, $minimum_time = false)
+function check_form_key($form_name, $timespan = false, $return_page = '', $trigger = false)
{
global $config, $user;
@@ -1978,10 +1978,6 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg
// we enforce a minimum value of half a minute here.
$timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']);
}
- if ($minimum_time === false)
- {
- $minimum_time = (int) $config['form_token_mintime'];
- }
if (isset($_POST['creation_time']) && isset($_POST['form_token']))
{
@@ -1990,7 +1986,7 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg
$diff = (time() - $creation_time);
- if (($diff >= $minimum_time) && (($diff <= $timespan) || $timespan == -1))
+ if (($diff <= $timespan) || $timespan === -1)
{
$token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : '';