mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/13052] Use request class instead of $_POST and request_var()
PHPBB3-13052
This commit is contained in:
parent
ad8d53af27
commit
ef61deb132
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue