OpenStack Compute (Nova)

OSAPI - Access addresses not checked for format

Reported by Daryl Walleck on 2011-11-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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) on 2011-11-17
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Alex Meade (alex-meade) on 2012-01-16
Changed in nova:
assignee: nobody → Alex Meade (alex-meade)

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

Changed in nova:
status: Confirmed → In Progress

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) on 2012-01-25
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers