diff --git a/defender/config.py b/defender/config.py index ae9298e..a0c66a3 100644 --- a/defender/config.py +++ b/defender/config.py @@ -15,7 +15,8 @@ MOCK_REDIS = get_setting('DEFENDER_MOCK_REDIS', False) # see if the user has overridden the failure limit FAILURE_LIMIT = get_setting('DEFENDER_LOGIN_FAILURE_LIMIT', 3) -LOCKOUT_BY_IP_USERNAME = get_setting('DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False) +LOCKOUT_BY_IP_USERNAME = get_setting( + 'DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME', False) # use a specific username field to retrieve from login POST data USERNAME_FORM_FIELD = get_setting('DEFENDER_USERNAME_FORM_FIELD', 'username') diff --git a/defender/utils.py b/defender/utils.py index f0b8d94..aebf934 100644 --- a/defender/utils.py +++ b/defender/utils.py @@ -253,7 +253,8 @@ def is_already_locked(request): if config.LOCKOUT_BY_IP_USERNAME: LOG.info("Block by ip & username") if ip_blocked and user_blocked: - # if both this IP and this username are present the reqeust is blocked + # if both this IP and this username are present the request is + # blocked return True else: