|
|
|
@ -333,12 +333,12 @@ class AccountService:
|
|
|
|
count = redis_client.get(key)
|
|
|
|
count = redis_client.get(key)
|
|
|
|
if count is None:
|
|
|
|
if count is None:
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
count = int(count)
|
|
|
|
count = int(count)
|
|
|
|
if count > AccountService.LOGIN_MAX_ERROR_LIMITS:
|
|
|
|
if count > AccountService.LOGIN_MAX_ERROR_LIMITS:
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def reset_login_error_rate_limit(email: str):
|
|
|
|
def reset_login_error_rate_limit(email: str):
|
|
|
|
key = f"login_error_rate_limit:{email}"
|
|
|
|
key = f"login_error_rate_limit:{email}"
|
|
|
|
|