Module: check_mk
Branch: master
Commit: 5dfa534c3a390f64aacce8c52b76a88a9ca60fe9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5dfa534c3a390f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 5 16:52:58 2012 +0100
ldap: Fixed encoding of all fetched ldap values
---
web/plugins/userdb/ldap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 3a492a0..8538efd 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -181,7 +181,7 @@ def ldap_search(base, filt = '(objectclass=*)', columns = [],
scope = None):
for dn, obj in ldap_connection.search_s(base, scope, filt, columns):
new_obj = {}
for key, val in obj.iteritems():
- new_obj[key.lower()] = val
+ new_obj[key.lower().decode('utf-8')] = [ i.decode('utf-8')
for i in val ]
result.append((dn, new_obj))
return result
#return ldap_connection.search_s(base, scope, filter, columns)