Skip to content

Commit a7a8af7

Browse files
committed
Fix warning on malformed CSRF token
Fixes #903
1 parent 297a455 commit a7a8af7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

qa-include/app/users.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,11 +1345,11 @@ function qa_check_form_security_code($action, $value)
13451345
} else {
13461346
$parts = explode('-', $value);
13471347

1348-
if (count($parts) == 3) {
1349-
$loggedin = $parts[0];
1350-
$timestamp = $parts[1];
1348+
if (count($parts) === 3) {
1349+
$loggedin = (int) $parts[0];
1350+
$timestamp = (int) $parts[1];
13511351
$hash = $parts[2];
1352-
$timenow = qa_opt('db_time');
1352+
$timenow = (int) qa_opt('db_time');
13531353

13541354
if ($timestamp > $timenow) {
13551355
$reportproblems[] = 'time ' . ($timestamp - $timenow) . 's in future';

0 commit comments

Comments
 (0)