summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/ldap')
-rw-r--r--pykolab/auth/ldap/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index fa01993..f823d46 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -21,6 +21,7 @@ import _ldap
import ldap
import ldap.async
import ldap.controls
+import ldap.filter
import logging
import time
@@ -964,7 +965,7 @@ class LDAP(pykolab.base.Base):
def search_entry_by_attribute(self, attr, value, **kw):
self._bind()
- _filter = "(%s=%s)" % (attr, value)
+ _filter = "(%s=%s)" % (attr, ldap.filter.escape_filter_chars(value))
config_base_dn = self.config_get('base_dn')
ldap_base_dn = self._kolab_domain_root_dn(self.domain)