FIX_RATE_LIMIT_MISSED_IN_HR

This commit is contained in:
velz 2026-03-13 18:16:39 +05:30
parent 742e721281
commit f4e44432f9
2 changed files with 3 additions and 0 deletions

View File

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

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