Update: 2026-06-11 13:47:39

This commit is contained in:
Hamza-Ayed
2026-06-11 13:47:40 +03:00
parent 977adfe99d
commit c5170a88d2
516 changed files with 3654 additions and 3321 deletions

View File

@@ -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'] ?? '?'));

View File

@@ -12,7 +12,7 @@ ini_set('display_errors', '0');
ini_set('log_errors', '1');
// تحديد مسار اللوج بشكل ديناميكي (محلياً أو سيرفر)
$logPath = '/home/intaleq-api/logs/php_errors.log';
$logPath = '/home/siro-api/logs/php_errors.log';
if (!file_exists(dirname($logPath)) || !is_writable(dirname($logPath))) {
$logPath = __DIR__ . '/../logs/php_errors.log';
}
@@ -40,7 +40,7 @@ if ($vendorPath) require_once $vendorPath;
require_once __DIR__ . '/helpers.php';
// تحديد مسار الـ .env بشكل ديناميكي
$envFile = '/home/intaleq-api/env/.env';
$envFile = '/home/siro-api/env/.env';
if (!file_exists($envFile)) {
$envFile = __DIR__ . '/../.env'; // مسار محلي افتراضي
}
@@ -57,7 +57,7 @@ try {
if ($redis->connect($redisHost, $redisPort, 1.5)) {
if ($redisPass) $redis->auth($redisPass);
$redis->setOption(Redis::OPT_PREFIX, 'intaleq:');
$redis->setOption(Redis::OPT_PREFIX, 'siro:');
} else {
$redis = null;
}