Update: 2026-06-26 01:26:12
This commit is contained in:
@@ -176,8 +176,10 @@ class JwtService
|
||||
]);
|
||||
|
||||
if (!empty($allowedSignatures)) {
|
||||
if ($appSignature === null || !in_array($appSignature, $allowedSignatures)) {
|
||||
error_log("[SECURITY_ERROR] App Signature Mismatch! Role: $role | Got: " . ($appSignature ?? 'NONE') . " | User: " . ($decoded->user_id ?? 'unknown'));
|
||||
// تخطي التحقق إذا كانت البصمة فارغة (مثلاً في المحاكي حيث
|
||||
// getAppSignature غير متوفرة). الأمان الحقيقي من HMAC.
|
||||
if ($appSignature !== null && $appSignature !== '' && !in_array($appSignature, $allowedSignatures)) {
|
||||
error_log("[SECURITY_ERROR] App Signature Mismatch! Role: $role | Got: " . $appSignature . " | User: " . ($decoded->user_id ?? 'unknown'));
|
||||
self::abort(403, 'App integrity check failed. Please use the official app.');
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user