Hide all plugin names except Flash, Java, and QuickTime
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Oct 2015 21:25:52 +0000 (21:25 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Oct 2015 21:25:52 +0000 (21:25 +0000)
commit71ce4d9e133d276d29959a2728c775d16e20d8df
treec8e31367799ff56ec2e39e0f6cdc818d87b04cc7
parentaba273935750efa242cf4fbfea73d8090eb87ab4
Hide all plugin names except Flash, Java, and QuickTime
https://bugs.webkit.org/show_bug.cgi?id=149014

Reviewed by Darin Adler.

Source/WebCore:

Revise plugin interface so that sites cannot iterate over all plugins to obtain
a list of installed plugins for fingerprinting purposes. Sites need to ask for
specific plugins by name, rather than iterating and comparing to avoid making
this information accessible for fingerprinting purposes.

* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::length): Only return length of the plugins we are
allowing to be seen.
(WebCore::DOMPluginArray::item): Only iterate through the plugins we are
allowing to be seen.
* plugins/PluginData.cpp:
(WebCore::PluginData::publiclyVisiblePlugins): Added.
* plugins/PluginData.h:

LayoutTests:

Update tests to notify internals that all plugins should be shown, not
just the publicly available ones.

* plugins/plugin-javascript-access.html:
* plugins/script-tests/navigator-mimeTypes-length.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/plugins/plugin-javascript-access.html
LayoutTests/plugins/script-tests/navigator-mimeTypes-length.js
Source/WebCore/ChangeLog
Source/WebCore/page/Page.h
Source/WebCore/plugins/DOMPluginArray.cpp
Source/WebCore/plugins/PluginData.cpp
Source/WebCore/plugins/PluginData.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl