OID 10g ldapsearch With -X Flag Returns Incorrect And/Or Inconsistent Results For Attributes With Base64 Encoded Values
Last updated on OCTOBER 03, 2016
Applies to:Oracle Internet Directory - Version: 10.1.4 to 10.1.4.3 - Release: 10gR3 to 10gR3
Information in this document applies to any platform.
Running ldapsearch with -X flag (print entries in XML format) where a attribute is stored with base64 encoding, results are incorrect and/or not consistent.
This affects scripts that make use of ldapsearch -X, such xmlparserv2.jar for xml file parsing, which returns error:
Invalid UTF8 encoding.ERROR while executing java
For example, for attribute "a" with a base64 encoded value, an ldapsearch without -X shows correctly:
ldapsearch -h myoidhost -p 389 -D cn=orcladmin -w mypwd -b "cn=myuser,cn=users,dc=mycompany,dc=com" -L -s base "objectclass=*" a
But ldapsearch with -X, the "a" attribute value shows differently and can change every time the ldapsearch is rerun:
ldapsearch -h myoidhost -p 389 -D cn=orcladmin -w mypwd -b "cn=myuser,cn=users,dc=mycompany,dc=com" -X -s base "objectclass=*" a
The difference may be noticeable or it may be subtle such as an extra non-printable character at the end of the value.
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