Bug 1506044 - Do not send cookies with ASan reporter submits. r=johannh
authorChristian Holler <choller@mozilla.com>
Wed, 21 Nov 2018 23:18:27 +0000
changeset 507143 062aef718a607660023c7e818a3760e54b0575a8
parent 507142 76c1898f6b021986beccc1461b1800ebe9f9e251
child 507144 9f21792d4ae6515aa1e12503b530757e884d4ff0
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1506044
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1506044 - Do not send cookies with ASan reporter submits. r=johannh Differential Revision: https://phabricator.services.mozilla.com/D12317
browser/modules/AsanReporter.jsm
--- a/browser/modules/AsanReporter.jsm
+++ b/browser/modules/AsanReporter.jsm
@@ -158,16 +158,19 @@ function submitToServer(data) {
 
       var xhr = new XMLHttpRequest();
       xhr.open("POST", api_url, true);
       xhr.setRequestHeader("Content-Type", "application/json");
 
       // For internal testing purposes, an auth_token can be specified
       if (auth_token) {
         xhr.setRequestHeader("Authorization", "Token " + auth_token);
+      } else {
+        // Prevent privacy leaks
+        xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS;
       }
 
       xhr.onreadystatechange = function() {
         if (xhr.readyState == 4) {
           if (xhr.status == "201") {
             logger.debug("XHR: OK");
             resolve(xhr);
           } else {