Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1099244

Summary: Proposal: Consider not honoring 'i18n' on LDAP attribute names . . .
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: ldapjdkAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED WONTFIX QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: kwright, mharmsen, nhosoi, nkinder, rmeggins, tbordaz
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1097868 Environment:
Last Closed: 2015-03-26 18:37:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1097868    
Bug Blocks:    

Description Matthew Harmsen 2014-05-19 22:08:46 UTC
+++ This bug was initially created as a clone of Bug #1097868 +++

The LDAPJDK utilizes the following Java calls which honor 'i18n':

    * toLowerCase()
    * toUpperCase()

These honor 'i18n' because they are actually calling the following:

    * toLowerCase(Locale.getDefault())
    * toUpperCase(Locale.getDefault())

This can cause problems for certain locales.

For example, if the default Locale is 'Turkish' (tr), the following problems arise when toLowerCase() is utilized:

    * uppercase non-dotted 'I' is translated to lowercase non-dotted 'i'
    * uppercase dotted 'I' is translated to lowercase dotted 'i'

Similar issues may exist for other Locales, including issues such as multibyte character sequences as supported by 'UTF-8'.

This bug proposes that te LDAPJDK be changed to no longer honor 'i18n' for attribute types, but still honor 'i18n' for all attribute data values:

     * toLowerCase() --> toLowerCase(Locale.ENGLISH)
     * toUpperCase() --> toUpperCase(Locale.ENGLISH)

Obviously, each individual usage of these two commands must be reviewed carefully to make certain that they are only being used on attribute names and not attribute data values.

--- Additional comment from Matthew Harmsen on 2014-05-14 14:12:13 EDT ---

References:

    * Bugzilla Bug #1083170 - Installation of IPA hangs up
                              when LANG is set to tr_TR.UTF8
    * PKI TRAC Ticket #946 - Installation of IPA hangs up
                             when LANG is set to tr_TR.UTF8
    * http://www.i18nguy.com/unicode/turkish-i18n.html
    * http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase
    * http://javapapers.com/core-java/javas-tolowercase-has-got-a-surprise-for-you/

--- Additional comment from thierry bordaz on 2014-05-15 13:27:47 EDT ---

This is a good catch. In fact if an attribute name contains a 'i' there is a chance the string manipulation in ldapjdk will translate 'i' into a dotless 'i' if we are in tr_TR.UTF8.

Will try to reproduce.

A workaround would be to set LANG=C

--- Additional comment from thierry bordaz on 2014-05-16 05:37:26 EDT ---

I have been unable to reproduce (mozilla/directory/java-sdk/tools/LDAPSearch.java).

run the command with LANG="tr_TR.utf8" and doing some searches like LDAPSearch -h localhost -p 1389 -D "cn=directory manager" -w Secret123 -b "dc=com" -S descrIptIon "descrIptIon=*" descrIptIon.

However, it is likely that use of toLowerCase/toUpperCase creates an issue but I was not able to do a test case

Comment 3 Nathan Kinder 2015-03-26 18:37:03 UTC
This issue has been worked around in pki-core.  We don't plan to do any updates to ldapjdk for this, so I'm closing as WONTFIX.