summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorMark Washenberger <mark.washenberger@rackspace.com>2011-03-28 13:40:16 -0400
committerMark Washenberger <mark.washenberger@rackspace.com>2011-03-28 13:40:16 -0400
commit71347f2e9d6195a25cabff782c7058bed006e286 (patch)
tree8e14788f245574ac41910334856a77182e884471 /nova/api
parent5977a511ed202fcf396e7c60d713eb5329d6883b (diff)
lock down requirements for change password
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index a98f81d98..b5727a7e1 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -599,6 +599,8 @@ class ControllerV11(Controller):
or not 'adminPass' in input_dict['changePassword']):
return exc.HTTPBadRequest()
password = input_dict['changePassword']['adminPass']
+ if not isinstance(password, basestring) or password == '':
+ return exc.HTTPBadRequest()
self.compute_api.set_admin_password(context, id, password)
return exc.HTTPAccepted()