From: Anil <rep...@gm...> - 2010-07-01 16:34:36
|
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 <mi...@st...>: > 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. > |