replicase at gmail.com
Thu Jul 1 18:34:09 CEST 2010
I've used this type of wild card search+compare before, all with
Solaris's ldapsearch, never complained. Let me change this to not use
a wild card like that.
2010/7/1 Michael Ströder <michael at stroeder.com>:
> Anil wrote:
>> I pass a filter string such as this to search(), but I keep getting
>> BAD SEARCH FILTER error.
> Using <= with * in the assertion value looks bogus to me.
>> The same thing works when using it with ldapsearch command.
> Does not work for me when using OpenLDAP's ldapsearch:
> $ ldapsearch "(|(last-login-time<=100101*)(\!(last-login-time=*)))"
> ldapsearch: ldap_search_ext: Bad search filter (-7)
> Note the extra back-shlash needed before ! since ! is a special char
> for the shell.
>> I also
>> tried running it through ldap.filter.escape_filter_chars.
> You should not pass complete filter strings to
> ldap.filter.escape_filter_chars(). This function should only be used for the
> assertion values you put into the filter string afterwards.
>> Is this a known bug?
> Ciao, Michael.
More information about the python-ldap