Is "%" String Allowed in 'ldapearch' Request? (Doc ID 1433281.1)

Last updated on OCTOBER 11, 2016

Applies to:

Oracle Directory Server Enterprise Edition - Version: 6.0 to 11.1.1.5.0 - Release: 6.0 to 11gR1
Information in this document applies to any platform.

Goal

Why do search requests containing %20 fail while \20 works.

for example, the following works. \20 is the escape sequence for a space.
# ldapsearch -D "cn=directory manager" -w password -p 1389 -b "ou=Company\20Servers,dc=ex,dc=com" objectclass=\* dn
version: 1
dn: ou=Company Servers,dc=ex,dc=com

but a search containing %20 fails with "No such object", why?

# ldapsearch -D "cn=directory manager" -w password -p 1389 -b
"ou=Company%20Servers, dc=ex,dc=com" objectclass=\*
ldap_search: No such object
ldap_search: matched: dc=ex,dc=com

The corresponding access log entry.
NOTE - This example is through a DPS instance but the same is true for the DS.

[14/Feb/2012:18:51:04 +0000] - OPERATION - INFO - conn=5 op=0 BIND
dn="cn=directory manager" method="SIMPLE" version=3
[14/Feb/2012:18:51:04 +0000] - SERVER_OP - INFO - conn=5 op=0 BIND
dn="cn=directory manager" method="SIMPLE" version=3 s_msgid=10
s_conn=ds-source:1
[14/Feb/2012:18:51:04 +0000] - SERVER_OP - INFO - conn=5 op=0 BIND RESPONSE
err=0 msg="" s_conn=ds-source:1
[14/Feb/2012:18:51:04 +0000] - OPERATION - INFO - conn=5 op=0 BIND RESPONSE
err=0 msg="" etime=0
[14/Feb/2012:18:51:04 +0000] - OPERATION - INFO - conn=5 op=1 msgid=2
SEARCH base="ou=Company%20Servers, dc=ex,dc=com" scope=2
filter="(objectclass=*)" attrs="*"
[14/Feb/2012:18:51:04 +0000] - SERVER_OP - INFO - conn=5 op=1 SEARCH
base="ou=company servers,dc=ex,dc=com" scope=2 filter="(objectclass=*)"
attrs="*" s_msgid=11 s_conn=ds-source:1
[14/Feb/2012:18:51:04 +0000] - SERVER_OP - INFO - conn=5 op=1 SEARCH
RESPONSE err=32 msg="" nentries=0 s_conn=ds-source:1
[14/Feb/2012:18:51:04 +0000] - OPERATION - INFO - conn=5 op=2 UNBIND
[14/Feb/2012:18:51:04 +0000] - DISCONNECT - INFO - conn=5 reason="unbind"
[14/Feb/2012:18:51:04 +0000] - OPERATION - INFO - conn=5 op=1 SEARCH
RESPONSE err=32 msg="" nentries=0 etime=0

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms