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

Unified Diff: third_party/upload.py

Issue 639503002: Make MIME boundary harder to accidentally match. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: 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: third_party/upload.py
diff --git a/third_party/upload.py b/third_party/upload.py
index fa4133c02c8252a3a0aec6f2eb0d80fd9acddc52..2265e4d208a960d93ca02880308c284fd221395d 100755
--- a/third_party/upload.py
+++ b/third_party/upload.py
@@ -972,7 +972,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)
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