Module: check_mk
Branch: master
Commit: efd2e00db4c4eeb930c72e90dcd9410b8e0fc98b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=efd2e00db4c4ee…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 18 09:36:24 2013 +0200
Fixed issues with lowercase transformation of username in ldap auth
---
web/htdocs/login.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index f6f1451..35cb19c 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -183,10 +183,14 @@ def do_login():
# False -> failed
result = userdb.hook_login(username, password)
if result:
+ # use the username provided by the successful login function, this
function
+ # might have transformed the username provided by the user. e.g.
switched
+ # from mixed case to lower case.
+ username = result
+
# reset failed login counts
userdb.on_succeeded_login(username)
- username = result
# The login succeeded! Now:
# a) Set the auth cookie
# b) Unset the login vars in further processing