Update: 2026-06-11 13:47:39
This commit is contained in:
@@ -36,7 +36,7 @@ class JwtService
|
||||
|
||||
public function __construct(?Redis $redis = null)
|
||||
{
|
||||
$this->secretKey = trim(file_get_contents('/home/intaleq-api/.secret_key'));
|
||||
$this->secretKey = trim(file_get_contents('/home/siro-api/.secret_key'));
|
||||
$this->hmacSecret = getenv('SECRET_KEY_HMAC') ?: '';
|
||||
$this->fpPepper = getenv('FP_PEPPER') ?: '';
|
||||
$this->issuer = (string)(getenv('APP_ISSUER') ?: '');
|
||||
@@ -145,7 +145,7 @@ class JwtService
|
||||
self::abort(401, 'Token expired');
|
||||
} catch (SignatureInvalidException $e) {
|
||||
// محاولة فك التشفير بمفتاح المحفظة (Wallet secret fallback)
|
||||
$payKeyPath = '/home/intaleq-api/.secret_key_pay';
|
||||
$payKeyPath = '/home/siro-api/.secret_key_pay';
|
||||
$payKey = file_exists($payKeyPath) ? trim(file_get_contents($payKeyPath)) : '';
|
||||
|
||||
if ($payKey) {
|
||||
@@ -288,7 +288,7 @@ class JwtService
|
||||
{
|
||||
$keyPath = getenv('INTERNAL_SOCKET_KEY_PATH');
|
||||
$sent = $_SERVER['HTTP_X_INTERNAL_KEY'] ?? '';
|
||||
$expected = (file_exists($keyPath) ? trim(file_get_contents($keyPath)) : '') ?: 'Intaleq_Secure_Bridge_Key_2026_@!socket';
|
||||
$expected = (file_exists($keyPath) ? trim(file_get_contents($keyPath)) : '') ?: 'Siro_Secure_Bridge_Key_2026_@!socket';
|
||||
|
||||
if (!$expected || !hash_equals($expected, $sent)) {
|
||||
error_log('[SECURITY] Invalid internal key from: ' . ($_SERVER['REMOTE_ADDR'] ?? '?'));
|
||||
|
||||
Reference in New Issue
Block a user