Skip to content

Commit 602f3bb

Browse files
authored
Using "timestampTolerance" on both sides
1 parent f4a21d6 commit 602f3bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

composer/packages/web-toolkit-bundle/src/Service/PrivacyConsentManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ private function validateTimestamp(array $data, ?array $latestConsentData): void
289289

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

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

0 commit comments

Comments
 (0)