From 2dd71494ae2fd4b5acf3c23e638efddec455f904 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 2 Mar 2026 15:14:35 +0530 Subject: [PATCH 1/3] FIX_ISSUE --- app/Controllers/RestAuthenticationController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 4573bbf..c6ea35c 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -685,6 +685,7 @@ class RestAuthenticationController extends AdminController $data = $this->request->getJSON(); + $email = $data->email; $HrData = $this->hrModel->where('email', $email) @@ -702,6 +703,8 @@ class RestAuthenticationController extends AdminController $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - verifyEmployeeWithMobileNumber: Sending default otp"); } + $data->otp = $otp; + if ($HrData) { //check the resend otp (with in 60 seconds don't allow another otp to send) From f7937f0b97abd254bffbc7d26fac26a18cb67edb Mon Sep 17 00:00:00 2001 From: velz Date: Mon, 9 Mar 2026 10:00:43 +0530 Subject: [PATCH 2/3] FIX_SOFT_BLOCK_DUR_WT_15MIN --- app/Config/RateLimiter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Config/RateLimiter.php b/app/Config/RateLimiter.php index 99d8b60..168aa6f 100644 --- a/app/Config/RateLimiter.php +++ b/app/Config/RateLimiter.php @@ -35,7 +35,7 @@ class RateLimiter extends BaseConfig |-------------------------------------------------------------------------- */ public array $userBlock = [ - 'soft_duration' => 0, // permanent, manual unblock only + 'soft_duration' => 900, // permanent, manual unblock only 'medium_duration' => 7200, // 2 hours 'hard_duration' => 86400, // 24 hours // attempts while at a block level before escalating to next From f4e44432f9bddab2d808402004236b8a18d832f8 Mon Sep 17 00:00:00 2001 From: velz Date: Fri, 13 Mar 2026 18:16:39 +0530 Subject: [PATCH 3/3] FIX_RATE_LIMIT_MISSED_IN_HR --- app/Controllers/RestAuthenticationController.php | 2 ++ app/Helpers/utility_helper.php | 1 + 2 files changed, 3 insertions(+) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index c6ea35c..02bf50f 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -873,6 +873,7 @@ class RestAuthenticationController extends AdminController // Call the third-party API function $apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedHrData'); + recordRateLimitFailure(); return $this->respond(['status' => 'failed','code' => 404,'data' => "" , 'post_enrollment'=> json_decode($apiResponse, true)],200); } @@ -881,6 +882,7 @@ class RestAuthenticationController extends AdminController // Call the third-party API function $apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedHrData'); + recordRateLimitFailure(); return $this->respond(['status' => 'failed','code' => 404,'data' => "" , 'post_enrollment'=> json_decode($apiResponse, true)],200); } } catch (\Exception $e) { diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php index bac046f..b07a22c 100755 --- a/app/Helpers/utility_helper.php +++ b/app/Helpers/utility_helper.php @@ -877,6 +877,7 @@ function generateFingerprint(bool $exclude_ua = false): string // Record user-level failure if (!empty($identity)) { + log_message('error','user block called in recordRateLimitFailure with' .$identity.' - '. $context ); $limiter->recordUserFailure($identity, $context); } } \ No newline at end of file