We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 464abe1 commit fc49b72Copy full SHA for fc49b72
php/src/Webhook.php
@@ -70,7 +70,7 @@ public function verify($payload, $headers)
70
71
public function sign($msgId, $timestamp, $payload)
72
{
73
- $is_positive_integer = ctype_digit($timestamp);
+ $is_positive_integer = is_numeric($timestamp) && (int) $timestamp == $timestamp && (int) $timestamp > 0;
74
if (!$is_positive_integer) {
75
throw new Exception\WebhookSigningException("Invalid timestamp");
76
}
0 commit comments