From 860f6f415172ffc2dd3a16cb22a53fa941a92504 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 15 Jan 2024 19:57:22 +0100 Subject: [PATCH 1/9] [Pale-Moon] [SSUAO] Add default override for Google Fonts served from wordpress. --- application/palemoon/branding/shared/pref/uaoverrides.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 6ba8dd6707..8f1140e79a 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -39,8 +39,10 @@ pref("@GUAO_PREF@.www.amazon.com","Mozilla/5.0 (%OS_SLICE% rv:45.9) @GK_SLICE@ F // Soundcloud uses Firefox-exclusive combinations of code. Never pass Firefox slice. pref("@GUAO_PREF@.soundcloud.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); pref("@GUAO_PREF@.players.brightcove.net","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"); + // Google fonts serves physically different fonts to later Firefox versions that render incorrectly unless on Gecko pref("@GUAO_PREF@.fonts.googleapis.com", "Mozilla/5.0 (%OS_SLICE% rv:61.9) Gecko/20100101 Firefox/61.9"); +pref("@GUAO_PREF@.fonts-api.wp.com", "Mozilla/5.0 (%OS_SLICE% rv:61.9) Gecko/20100101 Firefox/61.9"); // The following requires native mode. Or it blocks.. "too old firefox", breakage, etc. pref("@GUAO_PREF@.deviantart.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); From 9d9d5c9b1643caf657e003e657d58087a171313c Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 1 Feb 2024 10:52:52 +0100 Subject: [PATCH 2/9] [Pale-Moon] [SSUAO] Remove Amazon Prime Video override --- application/palemoon/branding/shared/pref/uaoverrides.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 8f1140e79a..4eb39a8059 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -34,8 +34,6 @@ pref("@GUAO_PREF@.web.de","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @ pref("@GUAO_PREF@.yahoo.com","Mozilla/5.0 (%OS_SLICE% rv:99.9) @GK_SLICE@ Firefox/99.9"); pref("@GUAO_PREF@.calendar.yahoo.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); -// For Amazon Prime videos -pref("@GUAO_PREF@.www.amazon.com","Mozilla/5.0 (%OS_SLICE% rv:45.9) @GK_SLICE@ Firefox/45.9 (Pale Moon)"); // Soundcloud uses Firefox-exclusive combinations of code. Never pass Firefox slice. pref("@GUAO_PREF@.soundcloud.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); pref("@GUAO_PREF@.players.brightcove.net","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"); From 7f0772e096bd7eb163fa455e8b74b331d0c74670 Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Thu, 1 Feb 2024 16:23:17 +0800 Subject: [PATCH 3/9] [Pale-Moon] No issue - Guard against empty MIME types when dealing with plug-ins --- application/palemoon/components/pageinfo/permissions.js | 5 +++++ .../palemoon/components/permissions/aboutPermissions.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/application/palemoon/components/pageinfo/permissions.js b/application/palemoon/components/pageinfo/permissions.js index c9e999971a..6abb467be5 100644 --- a/application/palemoon/components/pageinfo/permissions.js +++ b/application/palemoon/components/pageinfo/permissions.js @@ -268,6 +268,11 @@ function initPluginsRow() { if (mimeType == "application/x-shockwave-flash" && plugin.name != "Shockwave Flash") { continue; } + // XXX: Guard against plug-ins that include an empty MIME type + // in their list of handled MIME types (e.g. latest Java SE 8 plug-in). + if (mimeType.length == 0) { + continue; + } let permString = pluginHost.getPermissionStringForType(mimeType); if (!permissionMap.has(permString)) { let name = makeNicePluginName(plugin.name) + " " + plugin.version; diff --git a/application/palemoon/components/permissions/aboutPermissions.js b/application/palemoon/components/permissions/aboutPermissions.js index 421b65a0ef..b3bcad719b 100644 --- a/application/palemoon/components/permissions/aboutPermissions.js +++ b/application/palemoon/components/permissions/aboutPermissions.js @@ -566,6 +566,11 @@ var AboutPermissions = { if ((mimeType == gFlash.type) && (plugin.name != gFlash.name)) { continue; } + // XXX: Guard against plug-ins that include an empty MIME type + // in their list of handled MIME types (e.g. latest Java SE 8 plug-in). + if (mimeType.length == 0) { + continue; + } let permString = pluginHost.getPermissionStringForType(mimeType); if (!permissionMap.has(permString)) { let permissionEntry = document.createElementNS(XUL_NS, "box"); From caf7590a104a60edf612b42c99b3a30a976cf828 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 7 Feb 2024 12:58:57 +0100 Subject: [PATCH 4/9] [Pale-Moon] Issue #1959 - Add error handling to MIME type processing in prefs. --- .../components/preferences/applications.js | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/application/palemoon/components/preferences/applications.js b/application/palemoon/components/preferences/applications.js index c17894d449..b92307add1 100644 --- a/application/palemoon/components/preferences/applications.js +++ b/application/palemoon/components/preferences/applications.js @@ -1066,11 +1066,26 @@ var gApplicationsPane = { if (mimeType.type in this._handledTypes) { handlerInfoWrapper = this._handledTypes[mimeType.type]; } else { - let wrappedHandlerInfo = - this._mimeSvc.getFromTypeAndExtension(mimeType.type, null); - handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo); - handlerInfoWrapper.handledOnlyByPlugin = true; - this._handledTypes[mimeType.type] = handlerInfoWrapper; + if (mimeType.type == '') { + // If an incorrect empty MIME type is present, don't break. + continue; + } + try { + let wrappedHandlerInfo = + this._mimeSvc.getFromTypeAndExtension(mimeType.type, null); + handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo); + handlerInfoWrapper.handledOnlyByPlugin = true; + this._handledTypes[mimeType.type] = handlerInfoWrapper; +#ifdef DEBUG + console.log("Enumerate MIME type: " + mimeType.type); +#endif + } catch(e) { +#ifdef DEBUG + console.log("Error fetching MIME type info for " + mimeType.type); + console.log(e); +#endif + continue; + } } handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name; } From 146451981c80c4eff47f54504d473afa740878f8 Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sun, 21 Jan 2024 15:52:58 -0500 Subject: [PATCH 5/9] [Basilisk] [SSUAO] Add default override for Google Fonts served from wordpress. Port of MoonchildProductions/Pale-Moon@31ba8fc398 --- application/basilisk/branding/shared/uaoverrides.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index 3d51febca9..695f14833b 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -46,6 +46,7 @@ pref("@GUAO_PREF@.soundcloud.com","Mozilla/5.0 (%OS_SLICE% rv:@UXP_VERSION@) @UX pref("@GUAO_PREF@.players.brightcove.net","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"); // Google fonts serves physically different fonts to later Firefox versions that render incorrectly unless on Gecko pref("@GUAO_PREF@.fonts.googleapis.com", "Mozilla/5.0 (%OS_SLICE% rv:61.9) Gecko/20100101 Firefox/61.9"); +pref("@GUAO_PREF@.fonts-api.wp.com", "Mozilla/5.0 (%OS_SLICE% rv:61.9) Gecko/20100101 Firefox/61.9"); // The following requires native mode. Or it blocks.. "too old firefox", breakage, etc. pref("@GUAO_PREF@.deviantart.com","Mozilla/5.0 (%OS_SLICE% rv:@UXP_VERSION@) @UXP_DATE_SLICE@ @APP_SLICE@"); From 8171e8580a84d0b38c9d89b9b141d928828686b0 Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sat, 3 Feb 2024 12:36:01 -0500 Subject: [PATCH 6/9] [Basilisk] [SSUAO] remove spotify user agent override --- application/basilisk/branding/shared/uaoverrides.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index 695f14833b..3aee19d1c1 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -66,7 +66,6 @@ pref("@GUAO_PREF@.privat24.ua","Mozilla/5.0 (%OS_SLICE% rv:38.0) @GK_SLICE@ Fire pref("@GUAO_PREF@.citi.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 SeaMonkey/2.53.12"); pref("@GUAO_PREF@.facebook.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 @APP_SLICE@"); pref("@GUAO_PREF@.mewe.com", "Mozilla/5.0 (%OS_SLICE% rv:102.0) Gecko/20100101 Firefox/102.0"); -pref("@GUAO_PREF@.spotify.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); // UA-sniffing domains that are "app/vendor-specific" and do not like Basilisk pref("@GUAO_PREF@.web.whatsapp.com","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"); From 56de0d9596795295f3fe52e928e83bc11c2dce0b Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sat, 3 Feb 2024 13:25:15 -0500 Subject: [PATCH 7/9] [Basilisk] [SSUAO] Remove Amazon Prime Video override Port of https://repo.palemoon.org/MoonchildProductions/Pale-Moon/commit/a26c6a396aa80a08a3e946eecab11283c4f57f3a --- application/basilisk/branding/shared/uaoverrides.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index 3aee19d1c1..ee1b8620d0 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -39,8 +39,6 @@ pref("@GUAO_PREF@.web.de","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @ pref("@GUAO_PREF@.yahoo.com","Mozilla/5.0 (%OS_SLICE% rv:99.9) @GK_SLICE@ Firefox/99.9"); pref("@GUAO_PREF@.calendar.yahoo.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Basilisk)"); -// For Amazon Prime videos -pref("@GUAO_PREF@.www.amazon.com","Mozilla/5.0 (%OS_SLICE% rv:45.9) @GK_SLICE@ Firefox/45.9 (Basilisk)"); // Soundcloud uses Firefox-exclusive combinations of code. Never pass Firefox slice. pref("@GUAO_PREF@.soundcloud.com","Mozilla/5.0 (%OS_SLICE% rv:@UXP_VERSION@) @UXP_DATE_SLICE@ @APP_SLICE@"); pref("@GUAO_PREF@.players.brightcove.net","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"); From d0aae6139561f45b4cf137c7820fd83bfd4bd83b Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sat, 3 Feb 2024 13:09:54 -0500 Subject: [PATCH 8/9] [Basilisk] Guard against empty MIME types when dealing with plug-ins Port of MoonchildProductions/Pale-Moon#1956 --- application/basilisk/base/content/pageinfo/permissions.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/basilisk/base/content/pageinfo/permissions.js b/application/basilisk/base/content/pageinfo/permissions.js index 1e73b6d657..600bff348d 100644 --- a/application/basilisk/base/content/pageinfo/permissions.js +++ b/application/basilisk/base/content/pageinfo/permissions.js @@ -223,6 +223,11 @@ function initPluginsRow() { continue; } for (let mimeType of plugin.getMimeTypes()) { + // XXX: Guard against plug-ins that include an empty MIME type + // in their list of handled MIME types (e.g. latest Java SE 8 plug-in). + if (mimeType.length == 0) { + continue; + } let permString = pluginHost.getPermissionStringForType(mimeType); if (!permissionMap.has(permString)) { let name = BrowserUtils.makeNicePluginName(plugin.name); From 4f1fb965c68678e2536c0431f6d0f51b66f5d461 Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Tue, 20 Feb 2024 12:19:11 -0500 Subject: [PATCH 9/9] [Basilisk] Enable dialog by default --- application/basilisk/app/profile/basilisk.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index 2f5dfdfcc3..e0e7a9c9b8 100644 --- a/application/basilisk/app/profile/basilisk.js +++ b/application/basilisk/app/profile/basilisk.js @@ -467,6 +467,11 @@ pref("dom.enable_performance_navigation_timing", false); // beginning to expect this to be present. pref("dom.enable_performance_observer", true); +// Controls Whether element support is enabled or not. +// GitHub is broken without this enabled so we set this to true. +// See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog +pref("dom.dialog_element.enabled", true); + // popups.policy 1=allow,2=reject pref("privacy.popups.policy", 1); pref("privacy.popups.usecustom", true);