Closed Bug 934107 Opened 11 years ago Closed 8 years ago

[meta] Remove use of plugin enumeration

Categories

(Tech Evangelism Graveyard :: Other, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: BenB, Unassigned)

References

Details

(Keywords: dev-doc-complete, site-compat)

There are some websites that try to find out about media player plugins by enumerating all installed plugins (and then usually looking for specific plugins by name). This function will practically go away in bug 757726. The patch will have some compatibility layer to still show some very common plugins, because of the mentioned web site. The purpose of this bug is to get rid of high-profile websites using this enumeration. It is completely unnecessary, because there is another function to query for specific plugin names by name, and this will continue to work. Even better would be to look for plugins by mimetype. That allows alternative implementations, e.g. on Linux mplayer plugin can implement Quicktime videos. Sites should be encouraged to look for mimetypes only. How to use both browser API functions can be explained in followup comments.
Assignee: english-us → other
Severity: normal → minor
Component: English US → Other
OS: Linux → All
Hardware: x86_64 → All
Depends on: 934108
Example for deprecated code that needs to be replaced: function quicktimePlugin() { if (navigator.plugins && navigator.plugins.length) { for (var i = 0; i < navigator.plugins.length; i++) { var plugin = navigator.plugins[i]; if (plugin.name.indexOf("QuickTime") > -1) { qtInstalled = plugin; } } } }
Correction: Example for deprecated code that needs to be replaced: function haveQuicktimePlugin() { if (navigator.plugins && navigator.plugins.length) { for (var i = 0; i < navigator.plugins.length; i++) { var plugin = navigator.plugins[i]; if (plugin.name.indexOf("QuickTime") > -1) { return plugin; } } } }
Example for good code, using mimetype query (this allows to alternative implementations): function haveQuicktimePlugin() { var mimeTypes = navigator.mimeTypes; if (!mimeTypes) { return null; } var quicktime = mimeTypes["video/quicktime"]; if (!quicktime || !quicktime.enabledPlugin) { return null; } return quicktime; }
Depends on: 938885
Depends on: 942587
See Also: → 757726
Then how will the pluginscheck work? https://www.mozilla.org/zh-CN/plugincheck/
zhoubcfan, that is bug 938885. This bug here isn't for discussion, but to hold dependencies: https://bugzilla.mozilla.org/showdependencytree.cgi?id=934107
Depends on: 947629
Depends on: 947631
Depends on: 947635
Keywords: site-compat
Depends on: 950445
Depends on: 965493
Depends on: 972052
(In reply to Kohei Yoshino [:kohei] from comment #6) > Added to the site compat doc: > https://developer.mozilla.org/en-US/Firefox/Releases/28/Site_Compatibility I don't see anything which talks about the removal of the plugin enumeration on this site. Can you please check again?
(In reply to Henrik Skupin (:whimboo) from comment #7) > (In reply to Kohei Yoshino [:kohei] from comment #6) > > Added to the site compat doc: > > https://developer.mozilla.org/en-US/Firefox/Releases/28/Site_Compatibility > > I don't see anything which talks about the removal of the plugin enumeration > on this site. Can you please check again? Plugin enumeration will not ship until Firefox 29. Plugin enumeration is only temporarily disabled in Beta 28 (to help find broken websites). https://developer.mozilla.org/en-US/Firefox/Releases/29/Site_Compatibility
Depends on: 944805
Depends on: 990856
The plugincheck bits for this has landed on production, see the tracker https://bugzilla.mozilla.org/show_bug.cgi?id=990856
Product: Tech Evangelism → Tech Evangelism Graveyard
Is it possible to do disable plugin enumeration through an extension? (in the spirit of https://addons.mozilla.org/en-gb/firefox/addon/canvasblocker/ that disables canvas fingerprinting)
This evangelism bug will no longer be relevant after we drop support for all plugins (other than Flash) in Firefox 52 (bug 1269807).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.