Don't cause wings to explode with timestamps

This commit is contained in:
Dane Everitt
2021-01-21 21:24:48 -08:00
parent d87bacb539
commit 33400b1564
2 changed files with 35 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ use Pterodactyl\Models\Node;
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use Lcobucci\JWT\Signer\Key\InMemory;
use Pterodactyl\Extensions\Lcobucci\JWT\Encoding\TimestampDates;
class NodeJWTService
{
@@ -75,7 +76,7 @@ class NodeJWTService
$identifier = hash($algo, $identifiedBy);
$config = Configuration::forSymmetricSigner(new Sha256, InMemory::plainText($node->getDecryptedKey()));
$builder = $config->builder()
$builder = $config->builder(new TimestampDates)
->issuedBy(config('app.url'))
->permittedFor($node->getConnectionAddress())
->identifiedBy($identifier)