Skip to content
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit a9cedf6

Browse files
Fix leeways.
1 parent 9e9fc45 commit a9cedf6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ProjectInfinity/PocketVote/task/DiagnoseTask.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function onCompletion(Server $server) {
7878
$player->sendMessage(($result->payload->hasVotes ? TextFormat::GREEN.'' : TextFormat::RED.'').' Has votes (trivial)');
7979

8080
try {
81+
JWT::$leeway = 60;
8182
$token = JWT::decode($result->payload->voteSample, $this->secret, array('HS256'));
8283
if($token->player === 'PocketVoteSample' && $token->ip === '127.0.0.1' && $token->site === 'PocketVote.io') {
8384
$player->sendMessage((TextFormat::GREEN.'').' Decode sample vote');

src/ProjectInfinity/PocketVote/task/VoteCheckTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function onRun() {
6464
}
6565

6666
if($result->success && isset($result->payload)) {
67-
JWT::$leeway = 54000;
67+
JWT::$leeway = 120;
6868
try {
6969
$decoded = JWT::decode($result->payload, $this->secret, array('HS256'));
7070
} catch(\Exception $e) {

0 commit comments

Comments
 (0)