From 4bb2fcb340f7dcc089656d495fd99cb966072865 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Fri, 7 Jul 2017 06:23:59 +0100
Subject: [PATCH] Add log message when blacklisting users

---
 authserv/app_common.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/authserv/app_common.py b/authserv/app_common.py
index 0b9deb2..58677d2 100644
--- a/authserv/app_common.py
+++ b/authserv/app_common.py
@@ -92,7 +92,8 @@ def _do_auth(mc, username, service, shard, password, otp_token, source_ip,
 
     if retval != protocol.OK and current_app.config.get('ENABLE_BLACKLIST'):
         if user:
-            bl.auth_failure('u', username)
+            if bl.auth_failure('u', username):
+                current_app.logger.info('blacklisted user %s', username)
         if (source_ip
             and not whitelisted(source_ip, current_app.config.get('SOURCE_IP_WHITELIST'))):
             if bl.auth_failure('ip', source_ip):
-- 
GitLab