| Index: dashboard/dashboard/services/request.py
|
| diff --git a/dashboard/dashboard/services/request.py b/dashboard/dashboard/services/request.py
|
| index 9ffc59e7b6aa3c87e1b85f3f2c95cebe667344ab..8799c08eea93e5b354ad47d737ca55dd52fdef76 100644
|
| --- a/dashboard/dashboard/services/request.py
|
| +++ b/dashboard/dashboard/services/request.py
|
| @@ -9,13 +9,19 @@ import urllib
|
| from dashboard.common import utils
|
|
|
|
|
| +_VULNERABILITY_PREFIX = ")]}'\n"
|
| +
|
| +
|
| def RequestJson(*args, **kwargs):
|
| """Fetch a URL and JSON-decode the response.
|
|
|
| See the documentation for Request() for details
|
| about the arguments and exceptions.
|
| """
|
| - return json.loads(Request(*args, **kwargs))
|
| + content = Request(*args, **kwargs)
|
| + if content.startswith(_VULNERABILITY_PREFIX):
|
| + content = content[len(_VULNERABILITY_PREFIX):]
|
| + return json.loads(content)
|
|
|
|
|
| def Request(url, method='GET', body=None, **parameters):
|
|
|