bug 1380254: Don't send StackTraces field to Socorro; r?gsvelto draft
authorCarl Corcoran <carlco@gmail.com>
Mon, 28 Aug 2017 08:43:24 +0200
changeset 654220 f7a21cc12e58
parent 649622 7dddbd85047c
child 728503 f28f2b5bf3cb
push id76506
push userbmo:ccorcoran@mozilla.com
push dateMon, 28 Aug 2017 11:48:30 +0000
reviewersgsvelto
bugs1380254
milestone57.0a1
bug 1380254: Don't send StackTraces field to Socorro; r?gsvelto MozReview-Commit-ID: 3K5I5ZQam7q
toolkit/crashreporter/CrashSubmit.jsm
toolkit/crashreporter/client/crashreporter.cpp
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -222,17 +222,17 @@ Submitter.prototype = {
     let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
               .createInstance(Ci.nsIXMLHttpRequest);
     xhr.open("POST", serverURL, true);
 
     let formData = Cc["@mozilla.org/files/formdata;1"]
                    .createInstance(Ci.nsIDOMFormData);
     // add the data
     for (let [name, value] of Object.entries(this.extraKeyVals)) {
-      if (name != "ServerURL") {
+      if (name != "ServerURL" && name != "StackTraces") {
         formData.append(name, value);
       }
     }
     if (this.noThrottle) {
       // tell the server not to throttle this, since it was manually submitted
       formData.append("Throttleable", "0");
     }
     // add the minidumps
--- a/toolkit/crashreporter/client/crashreporter.cpp
+++ b/toolkit/crashreporter/client/crashreporter.cpp
@@ -752,18 +752,19 @@ int main(int argc, char** argv)
 
     string pendingDir = gSettingsPath + UI_DIR_SEPARATOR + "pending";
     if (!MoveCrashData(pendingDir, gReporterDumpFile, gExtraFile,
                        gMemoryFile)) {
       return 0;
     }
 
     string sendURL = queryParameters["ServerURL"];
-    // we don't need to actually send this
+    // we don't need to actually send these
     queryParameters.erase("ServerURL");
+    queryParameters.erase("StackTraces");
 
     queryParameters["Throttleable"] = "1";
 
     // re-set XUL_APP_FILE for xulrunner wrapped apps
     const char *appfile = getenv("MOZ_CRASHREPORTER_RESTART_XUL_APP_FILE");
     if (appfile && *appfile) {
       const char prefix[] = "XUL_APP_FILE=";
       char *env = (char*) malloc(strlen(appfile) + strlen(prefix) + 1);