Bug 1469427 - Add AppleScript-related extensions to download protection. r?gcp draft
authorFrancois Marier <francois@mozilla.com>
Mon, 18 Jun 2018 15:40:21 -0700
changeset 808275 e77b0341a1ca12f9005a895be2fdd40b22209b3f
parent 808264 1e2c9151a09e43613a79daa8d4a94dc3e314020c
child 808276 a3c7a87941b31d48b833a22cd303726a6f56d11d
push id113335
push userfmarier@mozilla.com
push dateMon, 18 Jun 2018 23:08:19 +0000
reviewersgcp
bugs1469427
milestone62.0a1
Bug 1469427 - Add AppleScript-related extensions to download protection. r?gcp MozReview-Commit-ID: Dc0gyfnmki8
toolkit/components/reputationservice/ApplicationReputation.cpp
--- a/toolkit/components/reputationservice/ApplicationReputation.cpp
+++ b/toolkit/components/reputationservice/ApplicationReputation.cpp
@@ -413,16 +413,17 @@ static const char* const kBinaryFileExte
     //".7z",
     //".ace",
     //".action", // Mac script
     //".ad", // Windows
     ".ade", // MS Access
     ".adp", // MS Access
     ".apk", // Android package
     ".app", // Executable application
+    ".applescript",
     ".application", // MS ClickOnce
     ".appref-ms", // MS ClickOnce
     //".arc",
     //".arj",
     ".as", // Mac archive
     ".asp", // Windows Server script
     ".asx", // Windows Media Player
     //".b64",
@@ -547,16 +548,18 @@ static const char* const kBinaryFileExte
     ".mshxml", // Windows
     ".msi", // Windows installer
     ".msp", // Windows installer
     ".mst", // Windows installer
     ".ndif", // Mac disk image
     //".ntfs", // 7z
     ".ocx", // ActiveX
     ".ops", // MS Office
+    ".osas", // AppleScript
+    ".osax", // AppleScript
     //".out", // Linux binary
     //".paf", // PortableApps package
     //".paq8f",
     //".paq8jd",
     //".paq8l",
     //".paq8o",
     ".partial", // Downloads
     ".pax", // Mac archive
@@ -621,19 +624,22 @@ static const char* const kBinaryFileExte
     ".rb", // Ruby script
     ".reg", // Windows Registry
     ".rels", // MS Office
     //".rgs", // Windows Registry
     ".rpm", // Linux package
     //".rtf", // MS Office
     //".run", // Linux shell
     ".scf", // Windows shell
+    ".scpt", // AppleScript
+    ".scptd", // AppleScript
     ".scr", // Windows
     ".sct", // Windows shell
     ".search-ms", // Windows
+    ".seplugin", // AppleScript
     ".sh", // Linux shell
     ".shar", // Linux shell
     ".shb", // Windows
     ".shs", // Windows shell
     ".shtml", // HTML
     ".shtm", // HTML
     ".sht", // HTML
     //".sldm", // MS PowerPoint
@@ -745,29 +751,35 @@ PendingLookup::GetDownloadType(const nsA
   MOZ_ASSERT(IsBinaryFile());
 
   // From https://cs.chromium.org/chromium/src/chrome/common/safe_browsing/download_protection_util.cc?l=17
   if (StringEndsWith(aFilename, NS_LITERAL_CSTRING(".zip"))) {
     return ClientDownloadRequest::ZIPPED_EXECUTABLE;
   } else if (StringEndsWith(aFilename, NS_LITERAL_CSTRING(".apk"))) {
     return ClientDownloadRequest::ANDROID_APK;
   } else if (StringEndsWith(aFilename, NS_LITERAL_CSTRING(".app")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".applescript")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".cdr")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".dart")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".dc42")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".diskcopy42")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".dmg")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".dmgpart")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".dvdr")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".img")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".imgpart")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".iso")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".mpkg")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".ndif")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".osas")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".osax")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".pkg")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".scpt")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".scptd")) ||
+             StringEndsWith(aFilename, NS_LITERAL_CSTRING(".seplugin")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".smi")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".sparsebundle")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".sparseimage")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".toast")) ||
              StringEndsWith(aFilename, NS_LITERAL_CSTRING(".udif"))) {
     return ClientDownloadRequest::MAC_EXECUTABLE;
   }