MERGE_UAT_COMMIT_RELESE_MSG

This commit is contained in:
Ubuntu 2026-03-16 13:24:57 +05:30
commit bfc7d94ead
3 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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)
@ -870,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);
}
@ -878,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) {

View File

@ -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);
}
}