Fix HTTP login attempts check triggering too late (#20431)

This commit is contained in:
Louis Matthijssen 2019-01-26 03:13:44 +01:00 committed by Anders Melchiorsen
parent 76c0295403
commit d39784906b
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ async def process_wrong_login(request):
request.app[KEY_FAILED_LOGIN_ATTEMPTS][remote_addr] += 1
if (request.app[KEY_FAILED_LOGIN_ATTEMPTS][remote_addr] >
if (request.app[KEY_FAILED_LOGIN_ATTEMPTS][remote_addr] >=
request.app[KEY_LOGIN_THRESHOLD]):
new_ban = IpBan(remote_addr)
request.app[KEY_BANNED_IPS].append(new_ban)