简体   繁体   中英

django-axes failed login attempts are not consecutive

django-axes 4.1.0 . I set the following configurations for django-axes which are working fine to soe limit:

AXES_LOCK_OUT_AT_FAILURE = config('AXES_LOCK_OUT_AT_FAILURE', 
default=True, cast=bool)
AXES_FAILURE_LIMIT = config('AXES_FAILURE_LIMIT', default=5, cast=int)
AXES_COOLOFF_TIME = config('AXES_COOLOFF_TIME', default=24, cast=int)

The user will be blocked after 5 failed login attempts as defined in the configs the problem is that they are not consecutive. If the user does 4 failed attempts followed by 1 successful login attempt and the a 1 failed login attempt, he will be blocked.

Is there a way to force the failed login attempts to be consecutive in order to block the user from logging in?

It might be possible via setting

AXES_RESET_ON_SUCCESS=True

however, it seems that you still have to wait for AXES_COOLOFF_TIME to pass.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM