globaleaks/GLBackend — pull request #141 by evilaliv3 (2013-08-14 14:54:59+00:00)
Title: addressed issue/316

i've implemented a simple feature to time-block users (admin/receivers) login attempts to limit possibility for bruteforce attacks.

if a user makes more thant 5 failed attempts the user is prevented to login for 5 minutes.
each attempt in the 5 minutes period resets the period.

the solution is very simple and needs only few edits to GLClient in order to handle the following new error message:

class TooMuchFailedLogins(GLException):
"""
tip_timetolive and submission_timetolive maybe proposed of weird values,
here is catch
"""
error_code = 49
status_code = 403
reason = "User login blocked for 5 minutes due to multiple failed logins"

this is ready to be merged. @hellais can you please take care of handling the error on GLClient side?