From bb13eb74e8ed846f14c45e392c1f2f344b2e44b1 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Tue, 23 Jun 2026 18:32:23 +0300 Subject: [PATCH] Update: 2026-06-23 18:32:23 --- backend/auth/otp/providers.php | 4 ++-- backend/core/Auth/RateLimiter.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/auth/otp/providers.php b/backend/auth/otp/providers.php index e1aa000..501cd17 100644 --- a/backend/auth/otp/providers.php +++ b/backend/auth/otp/providers.php @@ -186,14 +186,14 @@ function sendIntaleqOtp(string $receiver, string $otp, string $method = 'whatsap $apiUrl = 'https://otp.intaleqapp.com/api/request-otp.php'; $payload = [ 'phone' => $phoneWithPlus, - 'app_key' => $appKey, 'device_type' => 'android', 'method' => $method, 'code' => $otp ]; $response = curlCall("POST", $apiUrl, json_encode($payload), [ - 'Content-Type: application/json' + 'Content-Type: application/json', + "X-App-Key: $appKey" ]); if ($response) { diff --git a/backend/core/Auth/RateLimiter.php b/backend/core/Auth/RateLimiter.php index 953eb0b..2457d9f 100644 --- a/backend/core/Auth/RateLimiter.php +++ b/backend/core/Auth/RateLimiter.php @@ -44,6 +44,11 @@ class RateLimiter $this->redis->expire($key, $window); } + // Disable limit for register during debugging + if ($type === 'register') { + return true; + } + return $current <= $max; }