Module: check_mk
Branch: master
Commit: 319bedf92684216fb38845c64d21bf5b53dbe804
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=319bedf9268421…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Sep 30 15:55:09 2013 +0200
ldap attribute plugins: fixed crash when params are None
---
ChangeLog | 2 ++
web/plugins/userdb/ldap.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 55dc03d..b3b6c09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* windows_agent: increased maximum plugin output buffer size to 2MB
* FIX: windows_agent: fixed bug in cleanup of open thread handles
+ Multisite:
+ * FIX: ldap attribute plugins: fixed crash when parameters are None
1.2.3i2:
Core:
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 10fe2eb..4aa68d3 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -595,7 +595,7 @@ def ldap_needed_attributes():
for key, params in config.ldap_active_plugins.items():
plugin = ldap_attribute_plugins[key]
if 'needed_attributes' in plugin:
- attrs.update(plugin['needed_attributes'](params))
+ attrs.update(plugin['needed_attributes'](params or {}))
return list(attrs)
def ldap_convert_simple(user_id, ldap_user, user, user_attr, attr):
@@ -882,7 +882,7 @@ def ldap_sync(add_to_changelog, only_username):
# Gather config from convert functions of plugins
for key, params in config.ldap_active_plugins.items():
- user.update(ldap_attribute_plugins[key]['convert'](params, user_id,
ldap_user, user))
+ user.update(ldap_attribute_plugins[key]['convert'](params or {},
user_id, ldap_user, user))
if not mode_create and user == users[user_id]:
continue # no modification. Skip this user.