Skip to content

Commit c34c82a

Browse files
committed
SignedRequest request timestamp value must be an int
The value from $_SERVER is a numeric string, but an int is expected by the validation. Fixes #87
1 parent 8a9ce6d commit c34c82a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MessageBird/Objects/SignedRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function createFromGlobals()
5252
$body = file_get_contents('php://input');
5353
$queryParameters = $_GET;
5454
$requestTimestamp = isset($_SERVER['HTTP_MESSAGEBIRD_REQUEST_TIMESTAMP']) ?
55-
$_SERVER['HTTP_MESSAGEBIRD_REQUEST_TIMESTAMP'] : null;
55+
(int)$_SERVER['HTTP_MESSAGEBIRD_REQUEST_TIMESTAMP'] : null;
5656
$signature = isset($_SERVER['HTTP_MESSAGEBIRD_SIGNATURE']) ?
5757
$_SERVER['HTTP_MESSAGEBIRD_SIGNATURE'] : null;
5858

0 commit comments

Comments
 (0)