Skip to content

Commit 006a1e1

Browse files
Fixed comparison
1 parent 64f38f8 commit 006a1e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request/Request.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function validate() {
3838

3939
private function validateTimestamp() {
4040
$now = new DateTime;
41-
$differenceInSeconds = $now->getTimestamp() - $this->timestamp;
41+
$differenceInSeconds = $now->getTimestamp() - $this->timestamp->getTimestamp();
4242

4343
if ($differenceInSeconds > self::TIMESTAMP_VALID_TOLERANCE_SECONDS) {
4444
throw new InvalidArgumentException('Request timestamp was too old. Possible replay attack.');

0 commit comments

Comments
 (0)