Bug 1825387 - Enable JNLP as executable on the ESR only. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D174004
This commit is contained in:
Mike Kaply 2023-04-10 18:09:18 +00:00
parent 61e15cff3d
commit 37457022af
4 changed files with 18 additions and 4 deletions

View File

@ -275,10 +275,12 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = {
".internetconnect", // Configuration file for Apple system
//".inx", // InstallShield
".iso", // CD image
//".isp", exec // IIS config
//".isu", // InstallShield
//".jar", exec // Java
//".jnlp", exec // Java
//".isp", exec // IIS config
//".isu", // InstallShield
//".jar", exec // Java
#ifndef MOZ_ESR
//".jnlp", exec // Java
#endif
//".job", // Windows
//".jpg",
//".jpeg",

View File

@ -6,6 +6,7 @@
#include "nsLocalFileCommon.h"
#include "ApplicationReputation.h"
// clang-format off
// PLEASE read the comment in ApplicationReputation.cpp before modifying this
// list.
static const char* const kTestFileExtensions[] = {
@ -111,7 +112,9 @@ static const char* const kTestFileExtensions[] = {
".iso", // CD image
".isp", // IIS config
".jar", // Java
#ifndef MOZ_ESR
".jnlp", // Java
#endif
".js", // JavaScript script
".jse", // JScript
".ksh", // Linux shell
@ -298,6 +301,7 @@ static const char* const kTestFileExtensions[] = {
#endif
".zipx", // WinZip
};
// clang-format on
#define CheckListSorted(_list) \
{ \

View File

@ -25,6 +25,8 @@
// other warnings. PLEASE read the longer comment in
// toolkit/components/reputationservice/ApplicationReputation.cpp
// before modifying this list!
// If you update this list, make sure to update the length of sExecutableExts
// in nsLocalFileCommmon.h.
/* static */
const char* const sExecutableExts[] = {
// clang-format off
@ -61,7 +63,9 @@ const char* const sExecutableExts[] = {
".ins",
".isp",
".jar", // java application bundle
#ifndef MOZ_ESR
".jnlp",
#endif
".js",
".jse",
".lnk",

View File

@ -7,6 +7,10 @@
#ifndef _NS_LOCAL_FILE_COMMON_H_
#define _NS_LOCAL_FILE_COMMON_H_
#ifdef MOZ_ESR
extern const char* const sExecutableExts[100];
#else
extern const char* const sExecutableExts[101];
#endif
#endif