Bug 1200263 - Fixes getReportURL function so Help -> Report Web Forgery works again r=Ratty a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 23 Feb 2016 23:56:34 +0800
changeset 26885 c65354f52d3202b0f6554eae26bba0ef4603214f
parent 26884 2b998c31231320d54e5e659b718bfdc181a7d97d
child 26886 c41a3bed4953d73147da9dd62734c8be07d6da10
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty, IanN
bugs1200263
Bug 1200263 - Fixes getReportURL function so Help -> Report Web Forgery works again r=Ratty a=IanN
suite/browser/safeBrowsingOverlay.js
--- a/suite/browser/safeBrowsingOverlay.js
+++ b/suite/browser/safeBrowsingOverlay.js
@@ -20,31 +20,22 @@ var gSafeBrowsing = {
       broadcaster.removeAttribute("disabled");
     else
       broadcaster.setAttribute("disabled", true);
   },
 
   /**
    * Used to report a phishing page or a false positive
    * @param   aName
-   *          A String One of "Phish", "Error", "Malware" or "MalwareError".
+   *          A String One of "Phish", "PhishMistake" or "MalwareMistake".
    * @returns A String containing the report phishing URL.
    */
   getReportURL: function getReportURL(aName) {
-    var reportUrl = SafeBrowsing.getReportURL(aName);
-
     var pageUri = getBrowser().currentURI.cloneIgnoringRef();
-
-    // Remove the query to avoid including potentially sensitive data
-    if (pageUri instanceof Components.interfaces.nsIURL)
-      pageUri.query = "";
-
-    reportUrl += "&url=" + encodeURIComponent(pageUri.asciiSpec);
-
-    return reportUrl;
+    return SafeBrowsing.getReportURL(aName, pageUri);
   },
 
   initOverlay: function initOverlay(aEvent) {
     var popup = document.getElementById("helpPopup");
     popup.addEventListener("popupshowing", gSafeBrowsing.initMenuItems, false);
   }
 }