Module: check_mk
Branch: master
Commit: f382d599702952e94a7659b22a12ac8a879a5f86
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f382d599702952…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 11 09:27:13 2013 +0200
Only resetting the number of auth fails when really needed
---
web/htdocs/userdb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 95d3f4a..73d7c90 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -123,7 +123,7 @@ def user_locked(username):
def on_succeeded_login(username):
users = load_users(lock = True)
- if "num_failed" in users[username]:
+ if users[username].get('num_failed', 0) != 0:
users[username]["num_failed"] = 0
save_users(users)