瀏覽代碼

Fix Core\Csrf for instant redirects

Visman 4 年之前
父節點
當前提交
9410dba830
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Core/Csrf.php

+ 1 - 1
app/Core/Csrf.php

@@ -66,7 +66,7 @@ class Csrf
 
 
         $result = \is_string($token)
         $result = \is_string($token)
             && \preg_match('%f(\d+)$%D', $token, $matches)
             && \preg_match('%f(\d+)$%D', $token, $matches)
-            && $matches[1] + 0 < $now
+            && $matches[1] + 0 <= $now
             && $matches[1] + 1800 >= $now
             && $matches[1] + 1800 >= $now
             && \hash_equals($this->create($marker, $args, $matches[1]), $token);
             && \hash_equals($this->create($marker, $args, $matches[1]), $token);