Update Saqel Platform: 2026-09-08 13:43:36

This commit is contained in:
Hamza-Ayed
2026-09-08 13:43:36 +03:00
parent 0f424062fe
commit bb37b31cab
76 changed files with 3617 additions and 3059 deletions
+8 -1
View File
@@ -173,6 +173,11 @@ class Security
}
list($headerEncoded, $payloadEncoded, $signatureEncoded) = $parts;
$header = json_decode(self::base64UrlDecode($headerEncoded), true);
if (!is_array($header) || ($header['alg'] ?? '') !== 'HS256' || ($header['typ'] ?? '') !== 'JWT') {
return false;
}
$secret = self::getJwtSecret();
if (!$secret) {
@@ -187,7 +192,9 @@ class Security
}
$payload = json_decode(self::base64UrlDecode($payloadEncoded), true);
if (!$payload || !isset($payload['exp']) || time() >= $payload['exp']) {
$expectedIssuer = getenv('APP_URL') ?: 'https://saqel.intaleqapp.com';
if (!$payload || !isset($payload['exp'], $payload['iat'], $payload['jti']) || time() >= $payload['exp']
|| ($payload['iss'] ?? '') !== $expectedIssuer || ($payload['aud'] ?? '') !== 'saqel_app') {
return false;
}