From 80b542efc3218367b9b6a8905dc071690b63cce7 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 26 Jun 2025 01:51:02 +0200 Subject: [PATCH] [XPCOM] Add Mac-specific executable extensions --- xpcom/io/nsLocalFileUnix.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index 33c6b6bfaf..901ae833e8 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -1516,6 +1516,22 @@ 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. + "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. + "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. + "terminal", // macOS Terminal app configuration files +#endif "air", // Adobe AIR installer "jar" // java application bundle };