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

Unified Diff: appengine/chromium_rietveld/upload.py

Issue 624513002: Make MIME boundary harder to accidentally match. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Using this code to upload this patch Created 6 years, 2 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: appengine/chromium_rietveld/upload.py
diff --git a/appengine/chromium_rietveld/upload.py b/appengine/chromium_rietveld/upload.py
index 8f22fcb1cfa32845ec9c81a1d3a414f447d057f9..2647a0fde0de73c8b0012f0f53fbe7b963287501 100755
--- a/appengine/chromium_rietveld/upload.py
+++ b/appengine/chromium_rietveld/upload.py
@@ -973,7 +973,7 @@ def EncodeMultipartFormData(fields, files):
Source:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
"""
- BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
+ BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-%s-' % sum(hash(f) for f in files)
iannucci 2014/10/13 18:19:16 oh... I was meaning a real crypographic hash over
CRLF = '\r\n'
lines = []
for (key, value) in fields:
« 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