Bug 1167493 - Application Reputation: disable remote lookup of zip files on Mac/Linux, r=gcp
authorFrancois Marier <francois@mozilla.com>
Sat, 23 May 2015 20:05:37 +1200
changeset 264916 8eb4eb3288490a1ff402c12e238c035ce727cd10
parent 264915 b068592c488a020a70af9fed02cc669fa3aad670
child 264917 0be288d81a00557f7149c6bdd67450fe5c791750
push id8157
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:36:23 +0000
treeherdermozilla-aurora@d480e05bd276 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1167493
milestone41.0a1
Bug 1167493 - Application Reputation: disable remote lookup of zip files on Mac/Linux, r=gcp
toolkit/components/downloads/ApplicationReputation.cpp
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -379,16 +379,20 @@ PendingLookup::IsBinaryFile()
   if (NS_FAILED(rv)) {
     LOG(("No suggested filename [this = %p]", this));
     return false;
   }
   LOG(("Suggested filename: %s [this = %p]",
        NS_ConvertUTF16toUTF8(fileName).get(), this));
   return
     // From https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/safe_browsing/download_protection_util.cc&l=14
+    // Archives _may_ contain binaries
+#ifdef XP_WIN // disable on Mac/Linux, see 1167493
+    StringEndsWith(fileName, NS_LITERAL_STRING(".zip")) ||
+#endif
     // Android extensions
     StringEndsWith(fileName, NS_LITERAL_STRING(".apk")) ||
     // Windows extensions
     StringEndsWith(fileName, NS_LITERAL_STRING(".bas")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".bat")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".cab")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".cmd")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".com")) ||
@@ -399,19 +403,17 @@ PendingLookup::IsBinaryFile()
     StringEndsWith(fileName, NS_LITERAL_STRING(".reg")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".scr")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".vb")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".vbs")) ||
     // Mac extensions
     StringEndsWith(fileName, NS_LITERAL_STRING(".app")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".dmg")) ||
     StringEndsWith(fileName, NS_LITERAL_STRING(".osx")) ||
-    StringEndsWith(fileName, NS_LITERAL_STRING(".pkg")) ||
-    // Archives _may_ contain binaries
-    StringEndsWith(fileName, NS_LITERAL_STRING(".zip"));
+    StringEndsWith(fileName, NS_LITERAL_STRING(".pkg"));
 }
 
 ClientDownloadRequest::DownloadType
 PendingLookup::GetDownloadType(const nsAString& aFilename) {
   MOZ_ASSERT(IsBinaryFile());
 
   // From https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/safe_browsing/download_protection_util.cc&l=46
   if (StringEndsWith(aFilename, NS_LITERAL_STRING(".zip"))) {