Problems with comma inside RDN elements

Michael Ströder michael at stroeder.com
Mon Sep 29 22:16:45 CEST 2003


Michael Ströder wrote:
> 
> 2. Use ldap.filter.escape_filter_chars() for escaping the necessary 
> back-slash and other chars special to filter strings (new in 2.0.0pre12).

Or even better use ldap.filter.filter_format().

res = conn.search_s(
   BASE,
   ldap.SCOPE_SUBTREE,
   ldap.filter.filter_format(
     '(member=%s)',(MEMBER,)
   )
)

Ciao, Michael.



More information about the python-ldap mailing list