[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: wildcard searches with spaces in search filter



This was a problem for me because my accounting would come back as ' user ' which made it hard link accounting to a user for reporting. I simply started rejecting all white space in the usernames because they aren't valid anyway.

I wrote a patch to do this but it didn't get included in the distribution. It is available at:

http://www.aptalaska.net/~matt.s/freeradius/rlm_ldap_whitespace.patch

schu

(sorry for the double post Kurt, it left before I realized it was only going to you.)

Kurt D. Zeilenga wrote:
At 10:08 AM 8/27/2003, Giridhar Raichur wrote:

I am using Openldap 2.1.22 with Berkeley DB 4.1.25 on a RedHat 7.3
server.Backend database is bdb.

A query such as "ldapsearch -x '(cn=* martin *)'" returns results as if
the filter were '(cn=*martin*)'.


This is because, per the LDAP technical specification, the
directory string " martin " and "martin" are equal per the
CN attribute's equality matching rule.


How can I preserve the spaces in the search filter?


No.  The specification requires that leading, trailing,
and repeated spaces be ignored in this matching.

Kurt