Comment 33 for bug 1172106

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/icehouse)

Reviewed: https://review.openstack.org/91883
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=935fd60326feafd767993475a48b9f5973c828db
Submitter: Jenkins
Branch: stable/icehouse

commit 935fd60326feafd767993475a48b9f5973c828db
Author: John Dennis <email address hidden>
Date: Fri May 2 14:14:20 2014 -0400

    Encode/Decode LDAP parameters to/from UTF-8

    The python-ldap API only accepts UTF-8 encoded strings therefore any
    unicode values must be encoded to UTF-8 prior to passing to
    python-ldap and conversely UTF-8 encoded strings returned from
    python-ldap need to be decoded back from UTF-8 into unicode.

    Need to use unicode() rather than str() to properly handle non-ascii
    characters, but to be PY2/PY3 compatible use six.text_type.

    Very few of the ldap tests were using non-ascii values, in fact
    non-ascii values were restricted to only specific tests that
    had 'unicode' in their test name. This is very weak test coverage.
    Replace all occurances of 'fake', the standard string
    used in the tests for test value with 'fäké' where the a has an
    umlaut and the e has a diacritical. Visually they look almost the
    same but will trigger the type of encoding exceptions we've seen
    in the past.

    This is the minimal backport for icehouse from the following
    master commits:
    https://review.openstack.org/#/c/82396/
    https://review.openstack.org/#/c/82398/
    https://review.openstack.org/#/c/82399/

    Closes-Bug: #1172106

    Change-Id: I6b328dfc8435457a8d7ff16320f3d869cfa1043c