Module: check_mk
Branch: master
Commit: 967caa6012f6194a317b0ca4c4095ac4b2cb957a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=967caa6012f619…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 29 15:21:44 2014 +0200
#1067 FIX Fixed login problem in LDAP connector when no user filter specified
The 1.2.5i5 released introduced a bug which prevents user logins when the
LDAP configured does not has a LDAP user filter set. If you encounter this
problem either update to this release or set a user filter to prevent the
exception.
---
.werks/1067 | 12 ++++++++++++
ChangeLog | 1 +
web/plugins/userdb/ldap.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1067 b/.werks/1067
new file mode 100644
index 0000000..0eb0eaf
--- /dev/null
+++ b/.werks/1067
@@ -0,0 +1,12 @@
+Title: Fixed login problem in LDAP connector when no user filter specified
+Level: 2
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i6
+Date: 1406640020
+
+The 1.2.5i5 released introduced a bug which prevents user logins when the
+LDAP configured does not has a LDAP user filter set. If you encounter this
+problem either update to this release or set a user filter to prevent the
+exception.
diff --git a/ChangeLog b/ChangeLog
index 3e7cdc6..9316b4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
Multisite:
* 1066 Implemented Dashboard Designer...
+ * 1067 FIX: Fixed login problem in LDAP connector when no user filter specified...
WATO:
* 1064 FIX: Fixed rare issue with WATO communication in distributed setups (different
OS versions)...
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 3cf8883..e4ec3e7 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -475,7 +475,7 @@ def ldap_get_user(username, no_escape = False):
result = ldap_search(
ldap_replace_macros(config.ldap_userspec['dn']),
'(&(%s=%s)%s)' % (ldap_user_id_attr(),
ldap.filter.escape_filter_chars(username),
- config.ldap_userspec['filter']),
+ config.ldap_userspec.get('filter', '')),
[ldap_user_id_attr()],
)