Editing a tenant description with a special characters breaks the app
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Invalid
|
Medium
|
Unassigned |
Bug Description
To reproduce:
Login
Edit a tenant and paste the following description:
"Descripción"
Receive an: Error: Unhandled error.
Now the tenants page gives errors (Error: Unable to get tenant info: Unhandled error). Logout and try to login again and you'll get an Error: Unhandled error and be unable to log in again.
Keystone Log:
root : ERROR 'ascii' codec can't decode byte 0xf3 in position 9: ordinal not in range(128)
Traceback (most recent call last):
File "/opt/stack/
return func(*args, **kwargs)
File "/opt/stack/
return utils.send_
File "/opt/stack/
content = result.to_json()
File "/opt/stack/
values = [t.to_dict(
File "/opt/stack/
"description": unicode(
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position 9: ordinal not in range(128)
eventlet.
description: | updated |
description: | updated |
Changed in horizon: | |
importance: | Undecided → Medium |
milestone: | none → essex-4 |
status: | New → Confirmed |
Changed in horizon: | |
assignee: | nobody → Nebula (nebula) |
Changed in horizon: | |
milestone: | essex-4 → none |
Changed in horizon: | |
assignee: | Registry Administrators (registry) → nobody |
Looks like keystone.tenants has charset latin1:
mysql> show create table keystone.tenants; ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+ ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+ ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---+
+------
| Table | Create Table |
+------
| tenants | CREATE TABLE `tenants` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`desc` varchar(255) DEFAULT NULL,
`enabled` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 |
+------
1 row in set (0.00 sec)