Mozilla does not correctly handle multiple plugins for the same mime type

RESOLVED FIXED

Status

()

Core
Plug-ins
--
major
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Alessandro Pignotti, Assigned: Josh Aas)

Tracking

unspecified
Points:
---

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100721 Iceweasel/3.6.7 (like Firefox/3.6.7)
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:2.0b1) Gecko/20100725 Minefield/4.0b1

If more than a plugin is installed for the same MIME type (for example lightspark+gnash for SWF) mozilla should load either one is enabled

Reproducible: Always

Actual Results:  
Mozilla only looks for the first plugin in the list to declare if a plugin for a mimetype is available. So if a disabled plugin for the type is before an enabled one on the plugin list the enabled plugin is not loaded

Expected Results:  
The enabled plugin should be loaded.
(Reporter)

Comment 1

8 years ago
Created attachment 460172 [details] [diff] [review]
When finding plugins for a given mimetype looks only for enabled plugins

This patch applies to firefox 3.6.4, firefox 4.0b and hg trunk. I think it should be applied also to the stable 3.6 series.
Attachment #460172 - Flags: review?(a.pignotti)
(Reporter)

Updated

8 years ago
Attachment #460172 - Flags: review?(a.pignotti) → review?
(Reporter)

Comment 2

8 years ago
Created attachment 460174 [details] [diff] [review]
When finding plugins for a given mimetype looks only for enabled plugins

Ignore previous attachment. I have misclicked
Attachment #460172 - Attachment is obsolete: true
Attachment #460174 - Flags: review?
Attachment #460172 - Flags: review?
Attachment #460174 - Flags: review? → review?(benjamin)
(Assignee)

Updated

8 years ago
Attachment #460174 - Flags: review?(joshmoz)
(Assignee)

Updated

8 years ago
Assignee: nobody → a.pignotti
(Assignee)

Comment 3

8 years ago
Comment on attachment 460174 [details] [diff] [review]
When finding plugins for a given mimetype looks only for enabled plugins

We want the check to match the check in nsPluginHost::TrySetUpPluginInstance. I'm not sure what the point of looking for disabled plugins is, re-request review if I'm missing something.
Attachment #460174 - Flags: review?(joshmoz)
Attachment #460174 - Flags: review?(benjamin)
Attachment #460174 - Flags: review-
(Assignee)

Updated

8 years ago
Assignee: a.pignotti → joshmoz
OS: Linux → All
Hardware: x86_64 → All
(Assignee)

Comment 4

8 years ago
Created attachment 461806 [details] [diff] [review]
fix v1.0

Alessandro - does this fix the problem for you?
Attachment #460174 - Attachment is obsolete: true
(Assignee)

Comment 5

8 years ago
Created attachment 461818 [details] [diff] [review]
fix v1.1

Minimized changes.
Attachment #461806 - Attachment is obsolete: true
(Assignee)

Updated

8 years ago
Attachment #461818 - Flags: review?(jst)
(Reporter)

Comment 6

8 years ago
I confirm that this fixes the issue

Updated

8 years ago
Attachment #461818 - Flags: review?(jst) → review+

Updated

8 years ago
Attachment #461818 - Flags: approval2.0+
(Assignee)

Updated

8 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Reporter)

Comment 7

8 years ago
Could this patch be also applied to firefox 3.6 series?
(Assignee)

Comment 8

8 years ago
(In reply to comment #7)
> Could this patch be also applied to firefox 3.6 series?

Probably, I'll try to do it.
(Assignee)

Comment 9

8 years ago
I'm making this a 2.0 blocker as it is very poor behavior - this bug can effectively disable plugins that the user has enabled.
blocking2.0: --- → betaN+
(Assignee)

Updated

8 years ago
Whiteboard: DUPEME
(Assignee)

Comment 10

8 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/3166fda7d54d
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

8 years ago
Created attachment 462878 [details] [diff] [review]
fix v1.1 for 1.9.2

Requesting review from bsmedberg for the 1.9.2 patch because I want other set of eyes on this.
Attachment #462878 - Flags: review?(benjamin)

Comment 12

8 years ago
Comment on attachment 462878 [details] [diff] [review]
fix v1.1 for 1.9.2

I'm a little worried about the risk of this in relation to the extension manager views: doesn't it key extensions by MIME type or somesuch? I would want it to bake for a while on trunk first, at least.
Attachment #462878 - Flags: review?(benjamin) → review+
(Assignee)

Updated

8 years ago
Attachment #462878 - Flags: approval1.9.2.10?
Comment on attachment 462878 [details] [diff] [review]
fix v1.1 for 1.9.2

This doesn't appear to meet the stable branch criteria plus bsmedberg's worry about risk and we're going to have to turn this one down for 1.9.2.10
Attachment #462878 - Flags: approval1.9.2.10? → approval1.9.2.10-

Comment 14

7 years ago
Looks like this is pretty well sorted out, but here's some additional empirical info I have found.  

I too see this behavior.  If Firefox has two plugins registered for the same MIME type, Firefox always picks the one in alphabetical order as listed in the MozillaPlugins registry entries (on Windows at least).  If I change the order of the registry entries by renaming one, the other gets loaded.

The larger problem is this: If the user, via the Add-ons->Plugins panel disables the first one, Firefox doesn't then use the second registered plugin.  Instead, it just behaves like no plugin for that MIME type is installed.

If a user disables a plugin, Firefox should search the the plugins again to see if another is registered for that MIME type and use that...and so on until there are no more plugins able to handle that MIME type.

Also, there is a difference between Add-ons->Plugins and about:plugins.  Addons-plugins appears to list only those plugins which will be used by Firefox and about:plugins shows every plugin it has found.  This may be working as designed though.  If so, then Addons->plugins is also broken.  It is listing the wrong plugin for the MIME type when there are multiple plugins registered.  e.g. If there is pluginA and pluginB, Firefox will use pluginA, but show pluginB in the Plugins panel.

I'm on 3.6.12 and still see this behavior, even though the status is resolved-fixed.

Comment 15

7 years ago
I just tested this again in Firefox 4 beta 10 and it appears to be fixed there.  Thanks!

Updated

7 years ago
Duplicate of this bug: 635193
You need to log in before you can comment on or make changes to this bug.