Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2433)

Unified Diff: dashboard/dashboard/services/milo_service.py

Issue 2621803002: Clarify comment about jsonp header (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/services/milo_service.py
diff --git a/dashboard/dashboard/services/milo_service.py b/dashboard/dashboard/services/milo_service.py
index 85efff2720e68f4825a243fcd6d99221fe8d553a..a398deb7fd9b19a9b8f4d551c7297ec73d45cc4e 100644
--- a/dashboard/dashboard/services/milo_service.py
+++ b/dashboard/dashboard/services/milo_service.py
@@ -44,7 +44,9 @@ def GetBuildbotBuildInfo(master, builder, build_num):
if response.status_code != 200:
return None
- # Unwrap the gRPC message
+ # Unwrap the gRPC message.
+ # Start by removing the jsonp prefix
+ # (see http://security.stackexchange.com/questions/110539).
resp = json.loads(response.content[5:]) # Remove the jsonp header.
# Decompress and unmarshal the json message.
data = base64.b64decode(resp['data'])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698