Problems with comma inside RDN elements

Jens Vagelpohl jens at zope.com
Mon Sep 29 22:12:49 CEST 2003


> 1. The parentheses for the filter template are missing.

Yup, I know. I was just testing all kinds of combinations just to force 
some kind of solution :)


> 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).

I see the module inside the source package, but it never gets put 
anywhere by distutils from what I can tell. "ldap.filter" gives me an 
AttributeError.


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

I'll try as soon as the filter module is in place 8-)


> OpenLDAP shouldn't hang though.

The query itself was against a M$ CraptiveDirectory server. I found 
myself unable to force a record like that into OpenLDAP... hehe


>> cn=Doe, John,cn=Users,dc=as,dc=zope,dc=com
>
> This is not a valid DN anyway.

Yup, I know :)

jens

P.S.: Today I realized that I must have been unsubscribed from the list 
for quite a while. I just thought it had gotten really quiet...






More information about the python-ldap mailing list