← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1554517] Re: str() should not be used for exception message

 

** Project changed: django-openstack-auth => horizon

** Changed in: horizon
     Assignee: Akihiro Motoki (amotoki) => (unassigned)

** Tags added: low-hanging-fruit

** Description changed:

  In openstack_auth/backend.py, str() is used for logging of exception messages, but exception message can contain multi-byte strings and if so str() will fail with UnicodeEncodeError.
  We should use '%s' for logging (with more appropriate description).
  
  https://github.com/openstack/django_openstack_auth/blob/d779eb6fe3dedcd37e777f1530fa24a1a9343353/openstack_auth/backend.py#L113-L127
+ 
+ NOTE: django-openstack-auth was merged into horizon repo, but this bug
+ itself still exists.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1554517

Title:
  str() should not be used for exception message

Status in OpenStack Dashboard (Horizon):
  Confirmed

Bug description:
  In openstack_auth/backend.py, str() is used for logging of exception messages, but exception message can contain multi-byte strings and if so str() will fail with UnicodeEncodeError.
  We should use '%s' for logging (with more appropriate description).

  https://github.com/openstack/django_openstack_auth/blob/d779eb6fe3dedcd37e777f1530fa24a1a9343353/openstack_auth/backend.py#L113-L127

  NOTE: django-openstack-auth was merged into horizon repo, but this bug
  itself still exists.

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