Skip to content

Commit b930259

Browse files
authored
Merge pull request #1110 from abraham/random_int
Set min/max on random_int
2 parents 17ea3a7 + fe315db commit b930259

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,6 @@ public function buildSignature(
282282
*/
283283
public static function generateNonce(): string
284284
{
285-
return md5(microtime() . random_int());
285+
return md5(microtime() . random_int(PHP_INT_MIN, PHP_INT_MAX));
286286
}
287287
}

tests/mocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function microtime()
1515
return 'FAKE_MICROTIME';
1616
}
1717

18-
function random_int()
18+
function random_int($_min, $_max)
1919
{
2020
return 123_456_789;
2121
}

0 commit comments

Comments
 (0)