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. Thanks.
2010/7/1 Michael Ströder <[email protected]>: > Anil wrote: >> I pass a filter string such as this to search(), but I keep getting >> BAD SEARCH FILTER error. >> "(|(last-login-time<=100101*)(!(last-login-time=*)))" > > 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? > > Nope. > > Ciao, Michael. > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
