Skip to content

Commit

Permalink
Using "timestampTolerance" on both sides
Browse files Browse the repository at this point in the history
  • Loading branch information
liarco authored Jun 17, 2024
1 parent f4a21d6 commit 602f3bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private function validateTimestamp(array $data, ?array $latestConsentData): void

$userTimestamp = $data[self::JSON_KEY_TIMESTAMP];

if ($userTimestamp < $_SERVER['REQUEST_TIME'] - $this->timestampTolerance || $userTimestamp > $_SERVER['REQUEST_TIME'] + 1) {
if ($userTimestamp < $_SERVER['REQUEST_TIME'] - $this->timestampTolerance || $userTimestamp > $_SERVER['REQUEST_TIME'] + $this->timestampTolerance) {
throw new InvalidUserConsentDataException(
InvalidUserConsentDataException::TIMESTAMP_IS_NOT_IN_VALID_RANGE,
);
Expand Down

0 comments on commit 602f3bb

Please sign in to comment.