From d49ae5aabb44b1f0d6ae2959e14a711ebe793f06 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 23 Sep 2020 15:54:33 +0200 Subject: [PATCH] LdapServer.search(): add default filterstr and attrs parameter values --- LdapServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LdapServer.py b/LdapServer.py index a2878d5..c12100b 100644 --- a/LdapServer.py +++ b/LdapServer.py @@ -64,7 +64,7 @@ class LdapServer(object): return ldap.SCOPE_SUBTREE raise Exception("Unknown LDAP scope '%s'" % scope) - def search(self, basedn, filterstr, attrs, sizelimit=0, scope='sub'): + def search(self, basedn, filterstr='(objectClass=*)', attrs=[], sizelimit=0, scope='sub'): res_id = self.con.search(basedn, self.get_scope(scope), filterstr, attrs) ret = {} c=0