Bug 1364959 - Do remote application reputation lookups when downloading HTML files. r=dimi, a=gchang
authorFrancois Marier <francois@mozilla.com>
Fri, 19 May 2017 17:08:00 -0400
changeset 394043 eac1fd1b0c992cb1124d438fe1be37972ccabc4d
parent 394042 93e66a0ce8102ee500389ab819869b3ddfbaf1d6
child 394044 5de3b1528ca0947dfde7b1aef7a42f5984b5ee89
push id7339
push userryanvm@gmail.com
push dateMon, 22 May 2017 18:17:11 +0000
treeherdermozilla-beta@5de3b1528ca0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdimi, gchang
bugs1364959
milestone54.0
Bug 1364959 - Do remote application reputation lookups when downloading HTML files. r=dimi, a=gchang MozReview-Commit-ID: HHm9zQLtj05
testing/xpcshell/head.js
toolkit/components/downloads/ApplicationReputation.cpp
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -1605,16 +1605,17 @@ try {
     prefs.setCharPref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager.xml");
     prefs.setCharPref("media.gmp-manager.updateEnabled", false);
     prefs.setCharPref("extensions.systemAddon.update.url", "http://%(server)s/dummy-system-addons.xml");
     prefs.setCharPref("browser.selfsupport.url", "https://%(server)s/selfsupport-dummy/");
     prefs.setCharPref("extensions.shield-recipe-client.api_url",
                       "https://%(server)s/selfsupport-dummy/");
     prefs.setCharPref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy");
     prefs.setCharPref("browser.search.geoip.url", "https://%(server)s/geoip-dummy");
+    prefs.setCharPref("browser.safebrowsing.downloads.remote.url", "https://%(server)s/safebrowsing-dummy");
   }
 } catch (e) { }
 
 // Make tests run consistently on DevEdition (which has a lightweight theme
 // selected by default).
 try {
   if (runningInParent) {
     let prefs = Components.classes["@mozilla.org/preferences-service;1"]
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -551,16 +551,18 @@ static const char16_t* const kBinaryFile
     u".gadget", // Windows
     u".grp", // Windows
     u".gz", // Linux archive (gzip)
     u".gzip", // Linux archive (gzip)
     u".hfs", // Mac disk image
     u".hlp", // Windows Help
     u".hqx", // Mac archive
     u".hta", // HTML trusted application
+    u".htm",
+    u".html",
     u".htt", // MS HTML template
     u".img", // Mac disk image
     u".imgpart", // Mac disk image
     u".inf", // Windows installer
     u".ini", // Generic config file
     u".ins", // IIS config
     //u".inx", // InstallShield
     u".iso", // CD image