OSAPI - Access addresses not checked for format

Bug #891264 reported by Daryl Walleck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Alex Meade

Bug Description

I noticed that when creating or updating a server with an IPv4/6 address, the format what data is entered in those fields is not checked. It is certainly possible to enter any IP address for each field, but it seems that we should at least be verifying that whatever values are passed in should match the expected type.

Example body: {"server":{"flavorRef": 1, "name" : "test", "imageRef" : 6, "accessIPv4" : "notanaddress", "accessIPv6": "notanaddress" }}

Example response: {"server": {"status": "BUILD", "updated": "2011-11-16T17:40:29Z", "hostId": "32a0df08124d9b5987158d3a04e9abe8fcb9bb5f408bf5b407798cd1", "user_id": "xxxxxxx", "name": "test", "links": [{"href": "http://xxxx.xxxxxxxx.com:8774/xxxxx/v1.1/xxxxxx/servers/6180", "rel": "self"}, {"href": "http://xxxx.xxxxxxxx.com:8774/xxxxx/xxxxxxx/servers/6180", "rel": "bookmark"}], "created": "2011-11-16T17:40:28Z", "tenant_id": "xxxxxxx", "image": {"id": "6", "links": [{"href": "http://xxxx.xxxxxxxx.com:8774/xxxxx/xxxxxxxxxx/images/6", "rel": "bookmark"}]}, "adminPass": "QtBsmKbu4mB9", "uuid": "daff6966-c813-4833-ba7c-8fb6dd88f2d5", "accessIPv4": "notanaddress", "metadata": {}, "accessIPv6": "notanaddress", "key_name": null, "progress": 0, "flavor": {"id": "1", "links": [{"href": "http://xxxx.xxxxxxxx.com:8774/xxxxx/flavors/1", "rel": "bookmark"}]}, "config_drive": "", "id": 6180, "addresses": {}}}

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Alex Meade (alex-meade)
Changed in nova:
assignee: nobody → Alex Meade (alex-meade)
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/3066

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/3066
Committed: http://github.com/openstack/nova/commit/918d9998e1855879e35b039430b71277e3200814
Submitter: Jenkins
Branch: master

commit 918d9998e1855879e35b039430b71277e3200814
Author: Alex Meade <email address hidden>
Date: Mon Jan 16 15:35:08 2012 +0000

    Add ipv4 and ipv6 validation

    Fixes bug 891264

    Change-Id: Ie5975a6ee8129392b308d405ab5cb9303bdd0a89

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.