Module: check_mk
Branch: master
Commit: deb303f30c6d1d302d2efa15498612165c617036
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=deb303f30c6d1d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 14 15:29:25 2013 +0100
LDAP: Fixed problem with special chars in LDAP queries when having contactgroup sync
plugin enabled
---
ChangeLog | 2 ++
web/plugins/userdb/ldap.py | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7d8a0c5..2ebd6a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,8 @@
* Storing row selections in user files, cleaned up row selection
handling to single files. Cleaned up GET/POST mixups in confirm dialogs
* Add: New user_options to limit seen nagios objects even the role is set to see all
+ * FIX: LDAP: Fixed problem with special chars in LDAP queries when having
+ contactgroup sync plugin enabled
1.2.1i4:
Core:
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 3c99af3..612ded4 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -281,7 +281,7 @@ def ldap_user_groups(username, attr = 'cn'):
# Apply configured group ldap filter and only reply with groups
# having the current user as member
- filt = '(&%s(member=%s))' % (ldap_filter('groups'), user_dn)
+ filt = '(&%s(member=%s))' % (ldap_filter('groups'),
ldap.filter.escape_filter_chars(user_dn))
# First get all groups
groups = []