Differential Revision: https://phabricator.services.mozilla.com/D163275
This commit is contained in:
Marco Bonardo 2022-11-30 13:32:19 +00:00
Родитель 980cc5351f
Коммит dcd6608d14
6 изменённых файлов: 25 добавлений и 12 удалений

Просмотреть файл

@ -146,10 +146,13 @@ mozilla::LazyLogModule ApplicationReputationService::prlog(
// reputation checks.
/* static */
const char* const ApplicationReputationService::kNonBinaryExecutables[] = {
// clang-format off
".ad",
".afploc",
".air",
".fileloc",
".inetloc",
".atloc",
".ftploc",
// clang-format on
};
// Items that should be submitted for application reputation checks that users

Просмотреть файл

@ -25,7 +25,7 @@ class ApplicationReputationService final
NS_DECL_NSIAPPLICATIONREPUTATIONSERVICE
public:
static const char* const kNonBinaryExecutables[4];
static const char* const kNonBinaryExecutables[5];
#ifdef XP_WIN
static const char* const kBinaryFileExtensions[187];
#else

Просмотреть файл

@ -17,6 +17,7 @@ static const char* const kTestFileExtensions[] = {
".ad", // Windows (ignored for app rep)
".ade", // MS Access
".adp", // MS Access
".afploc", // Apple Filing Protocol Location (ignored for app rep)
".air", // Adobe Air (ignored for app rep)
".apk", // Android package
".app", // Executable application
@ -26,6 +27,7 @@ static const char* const kTestFileExtensions[] = {
".as", // Mac archive
".asp", // Windows Server script
".asx", // Windows Media Player
".atloc", // Appletalk Location (ignored for app rep)
".bas", // Basic script
".bash", // Linux shell
".bat", // Windows shell
@ -87,6 +89,7 @@ static const char* const kTestFileExtensions[] = {
".exe", // Windows executable
".fileloc", // Apple finder internet location data file
".fon", // Windows font
".ftploc", // Apple FTP Location (ignored for app rep)
".fxp", // MS FoxPro
".gadget", // Windows
".grp", // Windows
@ -97,14 +100,13 @@ static const char* const kTestFileExtensions[] = {
".hqx", // Mac archive
".hta", // HTML trusted application
".htm", ".html",
".htt", // MS HTML template
".img", // Mac disk image
".imgpart", // Mac disk image
".inetloc", // Apple finder internet location data file (ignored for app
// rep)
".inf", // Windows installer
".ini", // Generic config file
".ins", // IIS config
".htt", // MS HTML template
".img", // Mac disk image
".imgpart", // Mac disk image
".inetloc", // Apple finder internet location data file
".inf", // Windows installer
".ini", // Generic config file
".ins", // IIS config
".internetconnect", // Configuration file for Apple system
".iso", // CD image
".isp", // IIS config

Просмотреть файл

@ -35,10 +35,12 @@ const char* const sExecutableExts[] = {
".ad",
".ade", // access project extension
".adp",
".afploc", // Apple Filing Protocol Location
".air", // Adobe AIR installer
".app", // executable application
".application", // from bug 348763
".asp",
".atloc", // Appletalk Location
".bas",
".bat",
".cer", // Signed certificate file
@ -50,6 +52,7 @@ const char* const sExecutableExts[] = {
".der",
".exe",
".fileloc", // Apple finder internet location data file
".ftploc", // Apple FTP Location
".fxp", // FoxPro compiled app
".hlp",
".hta",

Просмотреть файл

@ -7,6 +7,6 @@
#ifndef _NS_LOCAL_FILE_COMMON_H_
#define _NS_LOCAL_FILE_COMMON_H_
extern const char* const sExecutableExts[98];
extern const char* const sExecutableExts[101];
#endif

Просмотреть файл

@ -1774,10 +1774,15 @@ nsLocalFile::IsExecutable(bool* aResult) {
// Search for any of the set of executable extensions.
static const char* const executableExts[] = {
#ifdef MOZ_WIDGET_COCOA
"afploc", // Can point to other files.
#endif
"air", // Adobe AIR installer
#ifdef MOZ_WIDGET_COCOA
"atloc", // Can point to other files.
"fileloc", // File location files can be used to point to other
// files.
"ftploc", // Can point to other files.
"inetloc", // Shouldn't be able to do the same, but can, due to
// macOS vulnerabilities.
#endif