aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNelson Billing <nbilling@google.com>2020-08-05 11:49:07 -0700
committerNelson Billing <nbilling@google.com>2020-08-05 19:42:38 +0000
commit3d8daa2c7458c8e411e691ac6f0d503418ef6231 (patch)
tree527c1cc9cec5920ce709102e4be226381df00c1c /src/common
parentFix v1 symupload protocol in Mac client. (diff)
downloadbreakpad-3d8daa2c7458c8e411e691ac6f0d503418ef6231.tar.xz
Fix sym-upload-v2 whitespace in filenames.
- Checking symbol status would fail for files whose names contained spaces, because the file name was being put in the URL unescaped. - Now the filename is escaped before being put in URL when checking symbol status. Change-Id: I3b989d877e0fd9aef57ec13bdbbb6c3dacb6a9e2 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2339782 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mac/SymbolCollectorClient.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/mac/SymbolCollectorClient.m b/src/common/mac/SymbolCollectorClient.m
index b997607f..70f511f1 100644
--- a/src/common/mac/SymbolCollectorClient.m
+++ b/src/common/mac/SymbolCollectorClient.m
@@ -70,11 +70,16 @@
withAPIKey:(NSString*)APIKey
withDebugFile:(NSString*)debugFile
withDebugID:(NSString*)debugID {
+ NSString* escapedDebugFile =
+ [debugFile stringByAddingPercentEncodingWithAllowedCharacters:
+ [NSCharacterSet URLHostAllowedCharacterSet]];
+
NSURL* URL = [NSURL
URLWithString:[NSString
stringWithFormat:@"%@/v1/symbols/%@/%@:checkStatus"
@"?key=%@",
- APIURL, debugFile, debugID, APIKey]];
+ APIURL, escapedDebugFile, debugID,
+ APIKey]];
HTTPGetRequest* getRequest = [[HTTPGetRequest alloc] initWithURL:URL];
NSError* error = nil;