← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1434011] [NEW] Keystoneclient can't handle Unicode objects

 

Public bug reported:

Keystoneclient cannot handle Objects which have Unicode name(UTF-8).

The problem is here: https://github.com/openstack/python-
keystoneclient/blob/master/keystoneclient/middleware/s3_token.py#L255

When envirion['PATH_INFO'] has arrived with unicode character(s), 
replace method raises UnicodeDecodeError.

The simplest solution to handle this problem is this:
============================================================================
255         environ['PATH_INFO'] = environ['PATH_INFO'].decode('utf-8').replace(account,
256                                                             new_tenant_name).encode('utf-8')
============================================================================

However, I am not sure this is a totally correct solution.
When the path_info is propagated to the other middleware(s), the same problem may happen if they try to manipulate the value without consideration about Unicode.

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1434011

Title:
  Keystoneclient can't handle Unicode objects

Status in OpenStack Identity (Keystone):
  New

Bug description:
  Keystoneclient cannot handle Objects which have Unicode name(UTF-8).

  The problem is here: https://github.com/openstack/python-
  keystoneclient/blob/master/keystoneclient/middleware/s3_token.py#L255

  When envirion['PATH_INFO'] has arrived with unicode character(s), 
  replace method raises UnicodeDecodeError.

  The simplest solution to handle this problem is this:
  ============================================================================
  255         environ['PATH_INFO'] = environ['PATH_INFO'].decode('utf-8').replace(account,
  256                                                             new_tenant_name).encode('utf-8')
  ============================================================================

  However, I am not sure this is a totally correct solution.
  When the path_info is propagated to the other middleware(s), the same problem may happen if they try to manipulate the value without consideration about Unicode.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1434011/+subscriptions


Follow ups

References