diff --git a/VERSION b/VERSION index f5eb630..402900e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2307.112200 +0.2307.112211 diff --git a/src/Security/CSRFP.php b/src/Security/CSRFP.php index b2ac4c6..3addb56 100644 --- a/src/Security/CSRFP.php +++ b/src/Security/CSRFP.php @@ -12,7 +12,7 @@ use Index\Serialisation\Serialiser; */ class CSRFP { private const TOLERANCE = 30 * 60; - private const EPOCH = 1682985600; + private const EPOCH = 1575158400; private const HASH_ALGO = 'sha3-256'; private const TIMESTAMP_LENGTH = 4; @@ -74,7 +74,7 @@ class CSRFP { * @return bool true if the token is valid, false if not. */ public function verifyToken(string $token, int $tolerance = -1, int $time = -1): bool { - if($tolerance === 0) + if($tolerance === 0 || empty($token)) return false; if($tolerance < 0) $tolerance = $this->tolerance;