Skip to content

Commit 55426b1

Browse files
committed
Change the tolerances to > 60 to expose the bug in Verifier::isExpired()
1 parent d979df0 commit 55426b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Requests/VerifierTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function a_signed_request_is_valid_if_the_signature_matches_the_signature
194194
*/
195195
public function is_expired_returns_true_if_no_timestamp_is_provided_on_the_request()
196196
{
197-
$tolerance = 60;
197+
$tolerance = 1000;
198198

199199
$id = "363c60de-9024-4915-99a9-88d63167665e";
200200

@@ -208,7 +208,7 @@ public function is_expired_returns_true_if_no_timestamp_is_provided_on_the_reque
208208
*/
209209
public function is_expired_returns_false_if_the_timestamp_is_within_the_tolerance_window()
210210
{
211-
$tolerance = 60;
211+
$tolerance = 1000;
212212

213213
$id = "363c60de-9024-4915-99a9-88d63167665e";
214214

@@ -224,7 +224,7 @@ public function is_expired_returns_false_if_the_timestamp_is_within_the_toleranc
224224
*/
225225
public function is_expired_returns_true_if_the_timestamp_is_outside_the_tolerance_window()
226226
{
227-
$tolerance = 60;
227+
$tolerance = 1000;
228228

229229
$id = "363c60de-9024-4915-99a9-88d63167665e";
230230

@@ -240,7 +240,7 @@ public function is_expired_returns_true_if_the_timestamp_is_outside_the_toleranc
240240
*/
241241
public function is_expired_returns_false_if_the_timestamp_is_in_the_future_but_within_the_tolerance()
242242
{
243-
$tolerance = 60;
243+
$tolerance = 1000;
244244

245245
$id = "363c60de-9024-4915-99a9-88d63167665e";
246246

@@ -256,7 +256,7 @@ public function is_expired_returns_false_if_the_timestamp_is_in_the_future_but_w
256256
*/
257257
public function is_expired_returns_if_the_timestamp_is_in_the_future_outside_of_the_tolerance()
258258
{
259-
$tolerance = 60;
259+
$tolerance = 1000;
260260

261261
$id = "363c60de-9024-4915-99a9-88d63167665e";
262262

0 commit comments

Comments
 (0)