diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-23 17:10:42 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-23 17:10:42 +0000 |
commit | 3e31a0ada9e03e67f8a6fc74e6e750fe4fc61013 (patch) | |
tree | 0fba63f95cfe2d3cb20dbf5ec9156e6f223e66dc /webkit | |
parent | eec23bcdb7ac703c4c32f059b5871361f2bdd5e6 (diff) | |
download | chromium_src-3e31a0ada9e03e67f8a6fc74e6e750fe4fc61013.zip chromium_src-3e31a0ada9e03e67f8a6fc74e6e750fe4fc61013.tar.gz chromium_src-3e31a0ada9e03e67f8a6fc74e6e750fe4fc61013.tar.bz2 |
Move version metadata from PluginGroup into PluginInstaller.
This also moves the plug-in information JSON files into their own subdirectory, so they can be changed without requiring OWNERS reviews for chrome/browser/resources (which is mostly WebUI otherwise).
BUG=124396
TEST=PluginInstallerTest.SecurityStatus:PluginFinderTest.JsonSyntax
Review URL: https://chromiumcodereview.appspot.com/10263022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/npapi/plugin_group.cc | 97 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_group.h | 53 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_group_unittest.cc | 155 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_list.cc | 133 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_list_unittest.cc | 2 |
5 files changed, 30 insertions, 410 deletions
diff --git a/webkit/plugins/npapi/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc index aa8be2f..6f3c607 100644 --- a/webkit/plugins/npapi/plugin_group.cc +++ b/webkit/plugins/npapi/plugin_group.cc @@ -27,38 +27,6 @@ const char PluginGroup::kRealPlayerGroupName[] = "RealPlayer"; const char PluginGroup::kSilverlightGroupName[] = "Silverlight"; const char PluginGroup::kWindowsMediaPlayerGroupName[] = "Windows Media Player"; -VersionRange::VersionRange(const VersionRangeDefinition& definition) - : low_str(definition.version_matcher_low), - high_str(definition.version_matcher_high), - min_str(definition.min_version) { - if (!low_str.empty()) - low.reset(Version::GetVersionFromString(low_str)); - if (!high_str.empty()) - high.reset(Version::GetVersionFromString(high_str)); - if (!min_str.empty()) - min.reset(Version::GetVersionFromString(min_str)); -} - -VersionRange::VersionRange(const VersionRange& other) { - InitFrom(other); -} - -VersionRange& VersionRange::operator=(const VersionRange& other) { - InitFrom(other); - return *this; -} - -VersionRange::~VersionRange() {} - -void VersionRange::InitFrom(const VersionRange& other) { - low_str = other.low_str; - high_str = other.high_str; - min_str = other.min_str; - low.reset(Version::GetVersionFromString(other.low_str)); - high.reset(Version::GetVersionFromString(other.high_str)); - min.reset(Version::GetVersionFromString(other.min_str)); -} - PluginGroup::PluginGroup(const string16& group_name, const string16& name_matcher, const std::string& identifier) @@ -71,7 +39,6 @@ void PluginGroup::InitFrom(const PluginGroup& other) { identifier_ = other.identifier_; group_name_ = other.group_name_; name_matcher_ = other.name_matcher_; - version_ranges_ = other.version_ranges_; web_plugin_infos_ = other.web_plugin_infos_; } @@ -87,12 +54,9 @@ PluginGroup& PluginGroup::operator=(const PluginGroup& other) { /*static*/ PluginGroup* PluginGroup::FromPluginGroupDefinition( const PluginGroupDefinition& definition) { - PluginGroup* group = new PluginGroup(ASCIIToUTF16(definition.name), - ASCIIToUTF16(definition.name_matcher), - definition.identifier); - for (size_t i = 0; i < definition.num_versions; ++i) - group->version_ranges_.push_back(VersionRange(definition.versions[i])); - return group; + return new PluginGroup(ASCIIToUTF16(definition.name), + ASCIIToUTF16(definition.name_matcher), + definition.identifier); } PluginGroup::~PluginGroup() { } @@ -132,25 +96,7 @@ bool PluginGroup::Match(const WebPluginInfo& plugin) const { return false; } - if (version_ranges_.empty()) { - return true; - } - - // There's at least one version range, the plugin's version must be in it. - scoped_ptr<Version> plugin_version(CreateVersionFromString(plugin.version)); - if (plugin_version.get() == NULL) { - // No version could be extracted, assume we don't match the range. - return false; - } - - // Match if the plugin is contained in any of the defined VersionRanges. - for (size_t i = 0; i < version_ranges_.size(); ++i) { - if (IsVersionInRange(*plugin_version, version_ranges_[i])) { - return true; - } - } - // None of the VersionRanges matched. - return false; + return true; } /* static */ @@ -213,41 +159,6 @@ bool PluginGroup::ContainsPlugin(const FilePath& path) const { return false; } -/*static*/ -bool PluginGroup::IsVersionInRange(const Version& version, - const VersionRange& range) { - DCHECK(range.low.get() != NULL || range.high.get() == NULL) - << "Lower bound of version range must be defined."; - return (range.low.get() == NULL && range.high.get() == NULL) || - (range.low->CompareTo(version) <= 0 && - (range.high.get() == NULL || range.high->CompareTo(version) > 0)); -} - -/*static*/ -bool PluginGroup::IsPluginOutdated(const Version& plugin_version, - const VersionRange& version_range) { - if (IsVersionInRange(plugin_version, version_range)) { - if (version_range.min.get() && - plugin_version.CompareTo(*version_range.min) < 0) { - return true; - } - } - return false; -} - -// Returns true if the latest version of this plugin group is vulnerable. -bool PluginGroup::IsVulnerable(const WebPluginInfo& plugin) const { - scoped_ptr<Version> version(CreateVersionFromString(plugin.version)); - if (!version.get()) - return false; - - for (size_t i = 0; i < version_ranges_.size(); ++i) { - if (IsPluginOutdated(*version, version_ranges_[i])) - return true; - } - return false; -} - bool PluginGroup::IsEmpty() const { return web_plugin_infos_.empty(); } diff --git a/webkit/plugins/npapi/plugin_group.h b/webkit/plugins/npapi/plugin_group.h index 05de752..5745129 100644 --- a/webkit/plugins/npapi/plugin_group.h +++ b/webkit/plugins/npapi/plugin_group.h @@ -25,17 +25,6 @@ namespace npapi { class PluginList; class MockPluginList; -// Hard-coded version ranges for plugin groups. -struct VersionRangeDefinition { - // Matcher for lowest version matched by this range (inclusive). May be empty - // to match everything iff |version_matcher_high| is also empty. - const char* version_matcher_low; - // Matcher for highest version matched by this range (exclusive). May be empty - // to match anything higher than |version_matcher_low|. - const char* version_matcher_high; - const char* min_version; // Minimum secure version. -}; - // Hard-coded definitions of plugin groups. struct PluginGroupDefinition { // Unique identifier for this group. @@ -44,36 +33,11 @@ struct PluginGroupDefinition { const char* name; // Substring matcher for the plugin name. const char* name_matcher; - // List of version ranges. - const VersionRangeDefinition* versions; - // Size of the array |versions| points to. - size_t num_versions; -}; - -// Run-time structure to hold version range information. -struct VersionRange { - public: - explicit VersionRange(const VersionRangeDefinition& definition); - VersionRange(const VersionRange& other); - VersionRange& operator=(const VersionRange& other); - ~VersionRange(); - - std::string low_str; - std::string high_str; - std::string min_str; - scoped_ptr<Version> low; - scoped_ptr<Version> high; - scoped_ptr<Version> min; - private: - void InitFrom(const VersionRange& other); }; // A PluginGroup can match a range of versions of a specific plugin (as defined // by matching a substring of its name). // It contains all WebPluginInfo structs (at least one) matching its definition. -// In addition, it knows about a security "baseline", i.e. the minimum version -// of a plugin that is needed in order not to exhibit known security -// vulnerabilities. class WEBKIT_PLUGINS_EXPORT PluginGroup { public: @@ -118,9 +82,6 @@ class WEBKIT_PLUGINS_EXPORT PluginGroup { // Checks whether a plugin exists in the group with the given path. bool ContainsPlugin(const FilePath& path) const; - // Returns true if |plugin| in this group has known security problems. - bool IsVulnerable(const WebPluginInfo& plugin) const; - // Check if the group has no plugins. Could happen after a reload if the plug- // in has disappeared from the pc (or in the process of updating). bool IsEmpty() const; @@ -133,10 +94,6 @@ class WEBKIT_PLUGINS_EXPORT PluginGroup { return web_plugin_infos_; } - const std::vector<VersionRange>& version_ranges() const { - return version_ranges_; - } - private: friend class MockPluginList; friend class PluginGroupTest; @@ -160,15 +117,6 @@ class WEBKIT_PLUGINS_EXPORT PluginGroup { // the created PluginGroup. static PluginGroup* FromWebPluginInfo(const webkit::WebPluginInfo& wpi); - // Returns |true| if |version| is contained in [low, high) of |range|. - static bool IsVersionInRange(const Version& version, - const VersionRange& range); - - // Returns |true| iff |plugin_version| is both contained in |version_range| - // and declared outdated (== vulnerable) by it. - static bool IsPluginOutdated(const Version& plugin_version, - const VersionRange& version_range); - PluginGroup(const string16& group_name, const string16& name_matcher, const std::string& identifier); @@ -184,7 +132,6 @@ class WEBKIT_PLUGINS_EXPORT PluginGroup { std::string identifier_; string16 group_name_; string16 name_matcher_; - std::vector<VersionRange> version_ranges_; std::vector<webkit::WebPluginInfo> web_plugin_infos_; }; diff --git a/webkit/plugins/npapi/plugin_group_unittest.cc b/webkit/plugins/npapi/plugin_group_unittest.cc index 2033296..a4f5547 100644 --- a/webkit/plugins/npapi/plugin_group_unittest.cc +++ b/webkit/plugins/npapi/plugin_group_unittest.cc @@ -8,128 +8,14 @@ #include <vector> #include "base/memory/scoped_ptr.h" -#include "base/string16.h" -#include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "base/values.h" #include "base/version.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/webplugininfo.h" namespace webkit { namespace npapi { -static const VersionRangeDefinition kPluginVersionRange[] = { - { "", "", "3.0.44" } -}; -static const VersionRangeDefinition kPlugin3VersionRange[] = { - { "0", "4", "3.0.44" } -}; -static const VersionRangeDefinition kPlugin4VersionRange[] = { - { "4", "5", "4.0.44" } -}; -static const VersionRangeDefinition kPlugin34VersionRange[] = { - { "0", "4", "3.0.44" }, - { "4", "5", "" } -}; - -static const PluginGroupDefinition kPluginDef = { - "myplugin", "MyPlugin", "MyPlugin", kPluginVersionRange, - arraysize(kPluginVersionRange) }; -static const PluginGroupDefinition kPluginDef3 = { - "myplugin-3", "MyPlugin 3", "MyPlugin", kPlugin3VersionRange, - arraysize(kPlugin3VersionRange) }; -static const PluginGroupDefinition kPluginDef4 = { - "myplugin-4", "MyPlugin 4", "MyPlugin", kPlugin4VersionRange, - arraysize(kPlugin4VersionRange) }; -static const PluginGroupDefinition kPluginDef34 = { - "myplugin-34", "MyPlugin 3/4", "MyPlugin", kPlugin34VersionRange, - arraysize(kPlugin34VersionRange) }; -static const PluginGroupDefinition kPluginDefNotVulnerable = { - "myplugin-latest", "MyPlugin", "MyPlugin", NULL, 0 }; - -const PluginGroupDefinition kPluginDefinitions[] = { - kPluginDef, - kPluginDef3, - kPluginDef4, - kPluginDef34, - kPluginDefNotVulnerable, -}; - -// name, path, version, desc. -static const WebPluginInfo kPluginNoVersion = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.2.0.43")), - string16(), ASCIIToUTF16("MyPlugin version 2.0.43")); -static const WebPluginInfo kPlugin2043 = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.2.0.43")), - ASCIIToUTF16("2.0.43"), ASCIIToUTF16("MyPlugin version 2.0.43")); -static const WebPluginInfo kPlugin3043 = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.3.0.43")), - ASCIIToUTF16("3.0.43"), ASCIIToUTF16("MyPlugin version 3.0.43")); -static const WebPluginInfo kPlugin3044 = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.3.0.44")), - ASCIIToUTF16("3.0.44"), ASCIIToUTF16("MyPlugin version 3.0.44")); -static const WebPluginInfo kPlugin3045 = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.3.0.45")), - ASCIIToUTF16("3.0.45"), ASCIIToUTF16("MyPlugin version 3.0.45")); -static const WebPluginInfo kPlugin3045r = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.3.0.45")), - ASCIIToUTF16("3.0r45"), ASCIIToUTF16("MyPlugin version 3.0r45")); -static const WebPluginInfo kPlugin4043 = WebPluginInfo( - ASCIIToUTF16("MyPlugin"), FilePath(FILE_PATH_LITERAL("myplugin.so.4.0.43")), - ASCIIToUTF16("4.0.43"), ASCIIToUTF16("MyPlugin version 4.0.43")); - -class PluginGroupTest : public testing::Test { - public: - static PluginGroup* CreatePluginGroup( - const PluginGroupDefinition& definition) { - return PluginGroup::FromPluginGroupDefinition(definition); - } - static PluginGroup* CreatePluginGroup(const WebPluginInfo& wpi) { - return PluginGroup::FromWebPluginInfo(wpi); - } -}; - -TEST_F(PluginGroupTest, PluginGroupMatch) { - scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup( - kPluginDef3)); - EXPECT_TRUE(group->Match(kPlugin3045)); - EXPECT_TRUE(group->Match(kPlugin3045r)); - EXPECT_FALSE(group->Match(kPluginNoVersion)); - group->AddPlugin(kPlugin3045); - EXPECT_FALSE(group->IsVulnerable(kPlugin3045)); - - group.reset(PluginGroupTest::CreatePluginGroup(kPluginDef)); - EXPECT_FALSE(group->Match(kPluginNoVersion)); -} - -TEST_F(PluginGroupTest, PluginGroupMatchCorrectVersion) { - scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup( - kPluginDef3)); - EXPECT_TRUE(group->Match(kPlugin2043)); - EXPECT_TRUE(group->Match(kPlugin3043)); - EXPECT_FALSE(group->Match(kPlugin4043)); - - group.reset(PluginGroupTest::CreatePluginGroup(kPluginDef4)); - EXPECT_FALSE(group->Match(kPlugin2043)); - EXPECT_FALSE(group->Match(kPlugin3043)); - EXPECT_TRUE(group->Match(kPlugin4043)); - - group.reset(PluginGroupTest::CreatePluginGroup(kPluginDef34)); - EXPECT_TRUE(group->Match(kPlugin2043)); - EXPECT_TRUE(group->Match(kPlugin3043)); - EXPECT_TRUE(group->Match(kPlugin4043)); -} - -TEST_F(PluginGroupTest, PluginGroupDefinition) { - for (size_t i = 0; i < arraysize(kPluginDefinitions); ++i) { - scoped_ptr<PluginGroup> def_group( - PluginGroupTest::CreatePluginGroup(kPluginDefinitions[i])); - ASSERT_TRUE(def_group.get() != NULL); - } -} - -TEST_F(PluginGroupTest, VersionExtraction) { +TEST(PluginGroupTest, VersionExtraction) { // Some real-world plugin versions (spaces, commata, parentheses, 'r', oh my) const char* versions[][2] = { { "7.6.6 (1671)", "7.6.6.1671" }, // Quicktime @@ -146,46 +32,9 @@ TEST_F(PluginGroupTest, VersionExtraction) { for (size_t i = 0; i < arraysize(versions); i++) { scoped_ptr<Version> version(PluginGroup::CreateVersionFromString( ASCIIToUTF16(versions[i][0]))); - EXPECT_STREQ(versions[i][1], version->GetString().c_str()); + EXPECT_EQ(versions[i][1], version->GetString()); } } -TEST_F(PluginGroupTest, IsVulnerable) { - // Adobe Reader 10 - VersionRangeDefinition adobe_reader_version_range[] = { - { "10", "11", "" }, - { "9", "10", "9.4.1" }, - { "0", "9", "8.2.5" } - }; - PluginGroupDefinition adobe_reader_plugin_def = { - "adobe-reader", "Adobe Reader", "Adobe Acrobat", - adobe_reader_version_range, arraysize(adobe_reader_version_range) }; - WebPluginInfo adobe_reader_plugin(ASCIIToUTF16("Adobe Reader"), - FilePath(FILE_PATH_LITERAL("/reader.so")), - ASCIIToUTF16("10.0.0.396"), - ASCIIToUTF16("adobe reader 10")); - scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup( - adobe_reader_plugin_def)); - group->AddPlugin(adobe_reader_plugin); - PluginGroup group_copy(*group); // Exercise the copy constructor. - EXPECT_FALSE(group_copy.IsVulnerable(adobe_reader_plugin)); - - // Silverlight 4 - VersionRangeDefinition silverlight_version_range[] = { - { "0", "4", "3.0.50106.0" }, - { "4", "5", "" } - }; - PluginGroupDefinition silverlight_plugin_def = { - "silverlight", "Silverlight", "Silverlight", silverlight_version_range, - arraysize(silverlight_version_range) }; - WebPluginInfo silverlight_plugin(ASCIIToUTF16("Silverlight"), - FilePath(FILE_PATH_LITERAL("/silver.so")), - ASCIIToUTF16("4.0.50917.0"), - ASCIIToUTF16("silverlight 4")); - group.reset(PluginGroupTest::CreatePluginGroup(silverlight_plugin_def)); - group->AddPlugin(silverlight_plugin); - EXPECT_FALSE(PluginGroup(*group).IsVulnerable(silverlight_plugin)); -} - } // namespace npapi } // namespace webkit diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc index 6023fee..474bc14 100644 --- a/webkit/plugins/npapi/plugin_list.cc +++ b/webkit/plugins/npapi/plugin_list.cc @@ -55,80 +55,36 @@ namespace npapi { // Note: If you change the plug-in definitions here, also update // chrome/browser/resources/plugins_*.json correspondingly! -// In particular, the identifier and the update URLs need to be kept in sync. +// In particular, the identifier needs to be kept in sync. -// Some version ranges can be shared across operating systems. This should be -// done where possible to avoid duplication. - -// This is up to date with -// http://www.adobe.com/support/security/bulletins/apsb12-03.html -// NOTE: We would like to go to the 4th component value but we cannot because -// on some platforms, such as Linux, it is not available. -static const VersionRangeDefinition kFlashVersionRange[] = { - { "", "", "11.1.102" } -}; -// This is up to date with -// http://www.adobe.com/support/security/bulletins/apsb12-02.html -static const VersionRangeDefinition kShockwaveVersionRange[] = { - { "", "", "11.6.4.634" } -}; -// This is up to date with -// http://support.microsoft.com/kb/2668562 -// http://technet.microsoft.com/en-us/security/Bulletin/MS12-016 -static const VersionRangeDefinition kSilverlightVersionRange[] = { - { "0", "5", "4.1.10111.0" }, - { "5", "6", "" }, -}; - -// Similarly, try and share the group definition for plug-ins that are +// Try and share the group definition for plug-ins that are // very consistent across OS'es. #define kFlashDefinition { \ - "adobe-flash-player", "Flash", "Shockwave Flash", kFlashVersionRange, \ - arraysize(kFlashVersionRange) } + "adobe-flash-player", "Flash", "Shockwave Flash" } #define kShockwaveDefinition { \ "adobe-shockwave", PluginGroup::kShockwaveGroupName, \ - "Shockwave for Director", kShockwaveVersionRange, \ - arraysize(kShockwaveVersionRange) } + "Shockwave for Director" } #define kSilverlightDefinition { \ - "silverlight", PluginGroup::kSilverlightGroupName, "Silverlight", \ - kSilverlightVersionRange, arraysize(kSilverlightVersionRange) } + "silverlight", PluginGroup::kSilverlightGroupName, "Silverlight" } #define kChromePdfDefinition { \ - "google-chrome-pdf", "Chrome PDF Viewer", "Chrome PDF Viewer", NULL, 0 } + "google-chrome-pdf", "Chrome PDF Viewer", "Chrome PDF Viewer" } #define kGoogleTalkDefinition { \ - "google-talk", "Google Talk", "Google Talk", NULL, 0 } + "google-talk", "Google Talk", "Google Talk" } #if defined(OS_MACOSX) // Plugin Groups for Mac. -// Plugins are listed here as soon as vulnerabilities and solutions -// (new versions) are published. -static const VersionRangeDefinition kQuicktimeVersionRange[] = { - { "", "", "7.6.6" } -}; -static const VersionRangeDefinition kJavaVersionRange[] = { - { "0", "13.0", "12.8.0" }, // Leopard - { "13.0", "14.0", "13.5.0" }, // Snow Leopard - { "14.0", "", "14.0.3" } // Lion -}; -static const VersionRangeDefinition kFlip4MacVersionRange[] = { - { "", "", "2.2.1" } -}; -// Note: The Adobe Reader browser plug-in is not supported in Chrome. -// Note: The Real Player plugin for mac doesn't expose a version at all. + static const PluginGroupDefinition kGroupDefinitions[] = { kFlashDefinition, - { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", - kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange) }, - { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", - kJavaVersionRange, arraysize(kJavaVersionRange) }, + { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in" }, + { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java" }, kSilverlightDefinition, - { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, - arraysize(kFlip4MacVersionRange) }, - { "divx-player", "DivX Plus Web Player", "DivX Plus Web Player", - NULL, 0 }, + { "flip4mac", "Flip4Mac", "Flip4Mac" }, + { "divx-player", "DivX Plus Web Player", "DivX Plus Web Player" }, kShockwaveDefinition, kChromePdfDefinition, kGoogleTalkDefinition, @@ -137,47 +93,20 @@ static const PluginGroupDefinition kGroupDefinitions[] = { #elif defined(OS_WIN) // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of // the RealPlayer files. -static const VersionRangeDefinition kQuicktimeVersionRange[] = { - { "", "", "7.6.9" } -}; -static const VersionRangeDefinition kJavaVersionRange[] = { - { "0", "7", "6.0.310" }, // "310" is not a typo. - { "7", "", "10.3" } // JDK7u3 identifies itself as 10.3 -}; -// This is up to date with -// http://www.adobe.com/support/security/bulletins/apsb12-08.html -static const VersionRangeDefinition kAdobeReaderVersionRange[] = { - { "10", "11", "10.1.3" }, - { "0", "10", "9.5.1" } -}; -static const VersionRangeDefinition kDivXVersionRange[] = { - { "", "", "1.4.3.4" } -}; -// This is up to date with -// http://service.real.com/realplayer/security/02062012_player/en/ -static const VersionRangeDefinition kRealPlayerVersionRange[] = { - { "", "", "15.0.2.71" } -}; + static const PluginGroupDefinition kGroupDefinitions[] = { kFlashDefinition, - { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", - kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange) }, - { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", - kJavaVersionRange, arraysize(kJavaVersionRange) }, - { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", - kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange) }, + { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in" }, + { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java" }, + { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat" }, kSilverlightDefinition, kShockwaveDefinition, - { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, - arraysize(kDivXVersionRange) }, - { "realplayer", PluginGroup::kRealPlayerGroupName, "RealPlayer", - kRealPlayerVersionRange, arraysize(kRealPlayerVersionRange) }, - // These are here for grouping, no vulnerabilities known. + { "divx-player", "DivX Player", "DivX Web Player" }, + { "realplayer", PluginGroup::kRealPlayerGroupName, "RealPlayer" }, { "windows-media-player", PluginGroup::kWindowsMediaPlayerGroupName, - "Windows Media Player", NULL, 0 }, - { "microsoft-office", "Microsoft Office", "Microsoft Office", - NULL, 0 }, - { "nvidia-3d", "NVIDIA 3D", "NVIDIA 3D", NULL, 0 }, + "Windows Media Player" }, + { "microsoft-office", "Microsoft Office", "Microsoft Office" }, + { "nvidia-3d", "NVIDIA 3D", "NVIDIA 3D" }, kChromePdfDefinition, kGoogleTalkDefinition, }; @@ -191,29 +120,13 @@ static const PluginGroupDefinition kGroupDefinitions[] = { }; #else // Most importantly, covers desktop Linux. -static const VersionRangeDefinition kJavaVersionRange[] = { - { "0", "1.7", "1.6.0.31" }, - { "1.7", "", "1.7.0.3" } -}; - -// Up to date with: -// http://blog.fuseyism.com/index.php/2012/02/15/ -// security-icedtea6-1-8-13-1-9-13-1-10-6-and-icedtea-2-0-1-released/ -static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { - { "0", "1.9", "1.8.13" }, - { "1.9", "1.10", "1.9.13" }, - { "1.10", "2", "1.10.6" }, - { "2", "", "2.0.1" } -}; static const PluginGroupDefinition kGroupDefinitions[] = { // Flash on Linux is significant because there isn't yet a built-in Flash // plug-in on the Linux 64-bit version of Chrome. kFlashDefinition, - { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", - kJavaVersionRange, arraysize(kJavaVersionRange) }, - { "redhat-icetea-java", "IcedTea", "IcedTea", - kRedhatIcedTeaVersionRange, arraysize(kRedhatIcedTeaVersionRange) }, + { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java" }, + { "redhat-icetea-java", "IcedTea", "IcedTea" }, kChromePdfDefinition, kGoogleTalkDefinition, }; diff --git a/webkit/plugins/npapi/plugin_list_unittest.cc b/webkit/plugins/npapi/plugin_list_unittest.cc index a58d06b..bc5d567 100644 --- a/webkit/plugins/npapi/plugin_list_unittest.cc +++ b/webkit/plugins/npapi/plugin_list_unittest.cc @@ -37,7 +37,7 @@ const char* kFooIdentifier = "foo"; const char* kFooGroupName = "Foo"; const char* kFooName = "Foo Plugin"; const PluginGroupDefinition kPluginDefinitions[] = { - { kFooIdentifier, kFooGroupName, kFooName, NULL, 0 }, + { kFooIdentifier, kFooGroupName, kFooName }, }; } // namespace |