fix is pretty easy, but fixing the tests afterwards is really annoying.
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index 1ffca9e..5760f88 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -560,8 +560,10 @@ class Resource(wsgi.Application): return Fault(webob.exc.HTTPBadRequest(explanation=msg))
project_id = args.pop("project_id", None) - if 'nova.context' in request.environ and project_id: - request.environ['nova.context'].project_id = project_id + if ('nova.context' in request.environ and project_id + and project_id != request.environ['nova.context'].project_id): + msg = _("Malformed request url") + return Fault(webob.exc.HTTPBadRequest(explanation=msg))
try: action_result = self.dispatch(request, action, args)
fix is pretty easy, but fixing the tests afterwards is really annoying.
diff --git a/nova/ api/openstack/ wsgi.py b/nova/ api/openstack/ wsgi.py api/openstack/ wsgi.py api/openstack/ wsgi.py wsgi.Applicatio n): exc.HTTPBadRequ est(explanation =msg))
index 1ffca9e..5760f88 100644
--- a/nova/
+++ b/nova/
@@ -560,8 +560,10 @@ class Resource(
return Fault(webob.
project_id = args.pop( "project_ id", None) environ[ 'nova.context' ].project_ id = project_id environ[ 'nova.context' ].project_ id): exc.HTTPBadRequ est(explanation =msg))
- if 'nova.context' in request.environ and project_id:
- request.
+ if ('nova.context' in request.environ and project_id
+ and project_id != request.
+ msg = _("Malformed request url")
+ return Fault(webob.
try:
action_ result = self.dispatch( request, action, args)