Module: check_mk
Branch: master
Commit: c9fdec9bfe23b3a9742b6b36fe4283580b0e1443
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9fdec9bfe23b3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 26 14:55:06 2017 +0200
5421 FIX LDAP: Fixed broken sync of group memberships for users with capital umlauts in
names
Change-Id: I5dcae9d3783c2489918c59e9e9bbf07ab243658b
---
.werks/5421 | 11 +++++++++++
web/plugins/userdb/ldap.py | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/5421 b/.werks/5421
new file mode 100644
index 0000000..84ecb38
--- /dev/null
+++ b/.werks/5421
@@ -0,0 +1,11 @@
+Title: LDAP: Fixed broken sync of group memberships for users with capital umlauts in
names
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1509022446
+
+
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 6b24b30..f58a8ce 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -526,8 +526,8 @@ class LDAPUserConnector(UserConnector):
new_obj = {}
for key, val in obj.iteritems():
# Convert all keys to lower case!
- new_obj[key.lower().decode('utf-8')] = [
i.decode('utf-8') for i in val ]
- result.append((dn.lower().decode('utf-8'), new_obj))
+ new_obj[key.decode('utf-8').lower()] = [
i.decode('utf-8') for i in val ]
+ result.append((dn.decode('utf-8').lower(), new_obj))
success = True
except ldap.NO_SUCH_OBJECT, e:
raise MKLDAPException(_('The given base object "%s"
does not exist in LDAP (%s))') % (base, e))