1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

[Pale-Moon] No issue - Guard against empty MIME types when dealing with plug-ins

This commit is contained in:
FranklinDM
2024-02-01 16:23:17 +08:00
committed by roytam1
parent 9d9d5c9b16
commit 7f0772e096
2 changed files with 10 additions and 0 deletions
@@ -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;
@@ -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");