diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index 0bcacef786..a3fdf58803 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); 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); diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index 909c59f523..b055aa658f 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -39,13 +39,12 @@ 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"); // 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@"); @@ -64,7 +63,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"); diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 6ba8dd6707..4eb39a8059 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -34,13 +34,13 @@ 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"); + // 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@"); 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"); 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; }