summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2012-01-23 21:30:20 +0000
committerAlex Meade <alex.meade@rackspace.com>2012-01-27 22:36:49 +0000
commit48c275da1271f47b43e1270a3bdd99c7e20dd122 (patch)
tree49e6ce57f65968744423a3fbd47fda43a65e2dde /nova/api
parentaefed532691f92c2e4b418afbef54479ac18ae57 (diff)
Instances to be created with a bookmark link
Fixes bug 913545 Change-Id: I6401a631211d76a8942d3435fb7dd463630cac7a
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index d0e771e22..925c6d42c 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -636,8 +636,11 @@ class Controller(wsgi.Controller):
# If the image href was generated by nova api, strip image_href
# down to an id and use the default glance connection params
- if str(image_href).startswith(req.application_url):
- image_href = image_href.split('/').pop()
+ image_href = image_href.split('/').pop()
+
+ if not utils.is_uuid_like(str(image_href)):
+ msg = _("Invalid imageRef provided.")
+ raise exc.HTTPBadRequest(explanation=msg)
personality = server_dict.get('personality')
config_drive = server_dict.get('config_drive')