summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/auth.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/api/auth.py b/nova/api/auth.py
index 5191189f2..a118b271e 100644
--- a/nova/api/auth.py
+++ b/nova/api/auth.py
@@ -99,7 +99,12 @@ class NovaKeystoneContext(wsgi.Middleware):
service_catalog = None
if req.headers.get('X_SERVICE_CATALOG') is not None:
- service_catalog = json.loads(req.headers.get('X_SERVICE_CATALOG'))
+ try:
+ catalog_header = req.headers.get('X_SERVICE_CATALOG')
+ service_catalog = json.loads(catalog_header)
+ except ValueError:
+ raise webob.exc.HTTPInternalServerError(
+ _('Invalid service catalog json.'))
ctx = context.RequestContext(user_id,
project_id,