mask_password doesn't handle non-ASCII characters
Bug #1366189 reported by
James Carey
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Invalid
|
Undecided
|
Unassigned | ||
Juno |
Fix Released
|
High
|
James Carey | ||
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
Icehouse |
Fix Released
|
High
|
James Carey | ||
OpenStack DBaaS (Trove) |
Fix Released
|
High
|
Amrith Kumar | ||
oslo.concurrency |
Invalid
|
High
|
Unassigned | ||
oslo.utils |
Fix Released
|
High
|
James Carey |
Bug Description
When the message passed to mask_password() contains non-ASCII characters the line:
message = six.text_
fails with:
UnicodeDe
Changed in oslo.utils: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → next-juno |
Changed in oslo.concurrency: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → next-kilo |
Changed in oslo.concurrency: | |
status: | Triaged → In Progress |
Changed in oslo.utils: | |
status: | Triaged → In Progress |
Changed in oslo.utils: | |
milestone: | next-juno → next-kilo |
Changed in oslo.concurrency: | |
milestone: | 0.1.0 → next-kilo |
Changed in oslo.concurrency: | |
milestone: | 0.2.0 → kilo-next |
Changed in oslo.utils: | |
status: | Fix Committed → Fix Released |
Changed in oslo.concurrency: | |
milestone: | 0.3.0 → next-kilo |
Changed in ceilometer: | |
status: | New → Invalid |
Changed in oslo.concurrency: | |
milestone: | next-kilo → none |
Changed in trove: | |
assignee: | nobody → Amrith (amrith) |
Changed in trove: | |
milestone: | none → kilo-2 |
Changed in trove: | |
status: | New → In Progress |
Changed in trove: | |
status: | In Progress → Fix Released |
status: | Fix Released → Fix Committed |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | kilo-2 → 2015.1.0 |
Changed in nova: | |
status: | New → Invalid |
Changed in oslo.concurrency: | |
status: | In Progress → Invalid |
To post a comment you must log in.
We could modify the use of six.text_type to specify an encoding and then to only call it if it needs to be done:
if not isinstance(message, six.text_type): type(message, 'utf8')
message = six.text_
Does that imply that we may need to do this anywhere that six.text_type is used?
Another option would be to set the default encoding to 'utf8' if we are running in Python 2.x, but I see a lot of debate about whether that's a good idea or not.