Nova API crashes for some special characters used in flavor ID

Bug #1202136 reported by Aswad Rangnekar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Rohan

Bug Description

Tested on: master with commit ID ddc20d70b38d18abb6e735d53c650873a7146770

If we create a flavor with ID as a special character with ascii character code >127,
an the entry is created in the database and it causes a 500 Internal Server Error while retrieving the flavors list,

Stack trace: http://paste.openstack.org/show/40662/

The issue here is that such characters as well as special symbols should not be allowed.
Flavor ID should be restricted to Integer values or UUID only, as enforced by python-novaclient.

Changed in nova:
assignee: nobody → Aswad Rangnekar (aswad-r)
description: updated
description: updated
Rohan (kanaderohan)
tags: added: doc-impact
summary: - Unicode or ASCII symbols should not be allowed in flavor id
+ Nova API crashes for some special characters used in flavor ID
description: updated
Tiantian Gao (gtt116)
tags: added: api
Rohan (kanaderohan)
Changed in nova:
assignee: Aswad Rangnekar (aswad-r) → Rohan (kanaderohan)
Revision history for this message
Sumanth Nagadavalli (sumanth-nagadavalli) wrote :

Hi Aswad,

I tried reproducing this bug, but I got "400 malformed" in the response instead.

Please see the paste below,

http://paste.openstack.org/show/42580/

Nova API did not crash.

Could you test this again with the latest master and see if the bug still exists?

Changed in nova:
status: New → Incomplete
Revision history for this message
Aswad Rangnekar (aswad-r) wrote :

@sumanth-nagadavalli: Note that I have mentioned this bug is for special chars with ascii code>127,
you have provided asterix ( * ), which falls below that range.

Changed in nova:
status: Incomplete → New
Revision history for this message
Rohit Karajgi (rohitk) wrote :

I am able to reproduce this issue on the latest nova code.

Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/39441

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/39441
Committed: http://github.com/openstack/nova/commit/578b76a55fc41b1380b18b3ade78b91677f5381b
Submitter: Jenkins
Branch: master

commit 578b76a55fc41b1380b18b3ade78b91677f5381b
Author: Rohan Kanade <email address hidden>
Date: Thu Jul 25 06:26:26 2013 -0700

    Adds Flavor ID validations

    * Flavor ID should not contain special symbols.
    * Flavor ID should be in range 1-255 characters.
    * Flavor ID should not have leading/trailing whitespaces.

    Fixes LP Bug 1202136
    DOCIMPACT

    Change-Id: I63c36811a57982e826f22f827f86d40ff6a6210e

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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