Late fix for #16174

git-svn-id: file:///svn/phpbb/trunk@8273 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-12-10 18:35:28 +00:00
parent 5f945443c9
commit f988177cb3

View file

@ -2050,11 +2050,11 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg
if ($timespan === false) if ($timespan === false)
{ {
// we enforce a minimum value of half a minute here. // we enforce a minimum value of half a minute here.
$timespan = max(30, $config['form_token_lifetime']); $timespan = ($config['form_token_lifetime'] == -1) ? -1 : max(30, $config['form_token_lifetime']);
} }
if ($minimum_time === false) if ($minimum_time === false)
{ {
$minimum_time = $config['form_token_mintime']; $minimum_time = (int) $config['form_token_mintime'];
} }
if (isset($_POST['creation_time']) && isset($_POST['form_token'])) if (isset($_POST['creation_time']) && isset($_POST['form_token']))