Full_Name: Herwig Bogaert Version: 2.4.31 OS: Debian Wheezy URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (2001:6a8:1d80:1128:d1b8:e59b:d3a0:a55a)
When a uniquemember attribute contains escaped characters, an ldap search for that attribute will return null.
Test case:
Following entry is used in the test: ldapsearch ..... -b dc=qas,dc=viaa,dc=be cn=testgroup # extended LDIF # # LDAPv3 # base <dc=qas,dc=viaa,dc=be> with scope subtree # filter: cn=testgroup # requesting: ALL #
# testgroup, apps, groups, qas.viaa.be dn: cn=testgroup,ou=apps,ou=groups,dc=qas,dc=viaa,dc=be uniqueMember: mail=test\2Buser@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc= be uniqueMember: mail=test-user@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc=be cn: testgroup objectClass: groupOfUniqueNames
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
Searching for test-user@example.org works fine:
ldapsearch ...-b dc=qas,dc=viaa,dc=be '(uniqueMember=mail=test-user@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc=be)' dn # extended LDIF # # LDAPv3 # base <dc=qas,dc=viaa,dc=be> with scope subtree # filter: (uniqueMember=mail=test-user@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc=be) # requesting: dn #
# testgroup, apps, groups, qas.viaa.be dn: cn=testgroup,ou=apps,ou=groups,dc=qas,dc=viaa,dc=be
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
But searching for test+user@example.org returns null
ldapsearch ... -b dc=qas,dc=viaa,dc=be '(uniqueMember=mail=test\2Buser@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc=be)' dn # extended LDIF # # LDAPv3 # base <dc=qas,dc=viaa,dc=be> with scope subtree # filter: (uniqueMember=mail=test\2Buser@example.org,ou=apps,ou=users,dc=qas,dc=viaa,dc=be) # requesting: dn #
# search result search: 2 result: 0 Success %# 3 numResponses: 1
I've tried different LDAP clients (openldap, Apache directory Studio, Ruby::Net::LDAP).
Thanks in advance
Herwig