0001-add-minimalistic-logging-for-login-failures-23407.patch
src/authentic2/user_login_failure.py | ||
---|---|---|
15 | 15 |
def user_login_failure(identifier): |
16 | 16 |
cache.add(key(identifier), 0) |
17 | 17 |
count = cache.incr(key(identifier)) |
18 |
logger = logging.getLogger('authentic2.user_login_failure') |
|
19 |
logger.info(u'user %s failed to login', identifier) |
|
18 | 20 |
if app_settings.A2_LOGIN_FAILURE_COUNT_BEFORE_WARNING and count >= app_settings.A2_LOGIN_FAILURE_COUNT_BEFORE_WARNING: |
19 |
logger = logging.getLogger('authentic2.user_login_failure') |
|
20 | 21 |
logger.warning(u'user %s failed to login more than %d times in a row', |
21 | 22 |
identifier, count) |
22 | 23 | |
23 |
- |