Closed Bug 551657 Opened 16 years ago Closed 9 years ago

nsIPluginHost reports duplicated/old plugins as enabled

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Manuel.Spam, Unassigned)

References

Details

Someone filed a bug for PrefBar, that Java sometimes gets displayed as enabled while it's disabled in the Addons manager. After doing some tries with test code, the result seems to be, that he had two versions of Java installed. Both got loaded by Firefox, but the Plugin manager only displays the newest plugin while the old plugin still resides in background and is still handled by nsIPluginHost in some way. I don't know if the plugin really is still loadable in this case and may cause a security problem, but IMHO what nsIPluginHost does here is confusing. If the plugin really is ignored, then nsIPluginHost shouldn't list it at all or should report in a clear way, that this Plugin is not interesting. I've added a link to the PrefBar bug to the "URL" field of this bug. The function "goPrefBar.GetPluginTags();", I use in commend #7, is the same as the following: function GetPluginTags() { if (!("nsIPluginHost" in Components.interfaces)) return false; var phs = Components.classes["@mozilla.org/plugin/host;1"] .getService(Components.interfaces.nsIPluginHost); var plugins = phs.getPluginTags({ }); return plugins; } and "prefbarRegExJava" is var prefbarRegExJava = /(^| )java.*(platform|plug-?in)/i;
I've rewritten my test code, so it runs on any SeaMonkey/Firefox installation without needing PrefBar special stuff. If you have two Java plugins, then it will report them both while the older one (or the one, detected first?) is reported as enabled. The Addon manager only reports one of the two. var prefbarRegExJava = /(^| )java.*(platform|plug-?in)/i; var phs = Components.classes["@mozilla.org/plugin/host;1"] .getService(Components.interfaces.nsIPluginHost); var plugins = phs.getPluginTags({ }); if (plugins) { for (var i = 0; i < plugins.length; i++) { if (plugins[i].name.match(prefbarRegExJava)) { var plugin = plugins[i]; alert(plugin.name + "\nEnabled: " + !plugin.disabled + "\nBlocklisted: " + plugin.blocklisted + "\nBlockState: " + plugin.blocklistState); } } }
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.