Attempting to update an image property or add an image tag with 4 byte unicode returns a 500, not a 400

Bug #1449611 reported by Luke Wollney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
In Progress
Undecided
Unassigned

Bug Description

Overview:
When attempting to reproduce an the following Launchpad bug (https://bugs.launchpad.net/glance/+bug/1370954), 4 byte unicode characters should no longer be allowed for image properties or image tags. Using the specific value of 'u'Černý'', a 500 response still appears to be returned instead of a 400 response as we should. This could be a potential issue that regex didn't catch.

Steps to reproduce:
1) Import an image
2) Attempt to update the image name, passing in 4 byte unicode via:
curl -i /v2/images/<image_id> -X PATCH -H "Content-Type: application/openstack-images-v2.1-json-patch" -H "Accept: application/json" -H "X-Auth-Token: <token>" -d '[{"path": "/name", "value": "u'Černý'", "op": "replace"}]'
3) Notice that a 500 response is returned
4) Attempt to add an image tag, passing in 4 byte unicode via:
curl -i /v2/images/<image_id>/tags/u'Černý' -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <token>"
5) Notice that a 500 response is returned

Expected:
A 400 response should be returned

Actual:
A 500 response is returned for both of these operations

Changed in glance:
assignee: nobody → Anand Shanmugam (anand1712)
status: New → In Progress
Changed in glance:
assignee: Anand Shanmugam (anand1712) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.