diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-11-27 12:22:09 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-18 10:29:44 +0100 |
commit | 140e3f5c03938fa9d6a9524c3b859a95d3a540ee (patch) | |
tree | 4ea5f37e6ad3d893fec6f317ff5c92cc320b3bfa /dom/plugins/base/nsPluginHost.cpp | |
parent | aa752bce480514310b04a8cb05fe0faa9de85a5c (diff) | |
download | UXP-140e3f5c03938fa9d6a9524c3b859a95d3a540ee.tar UXP-140e3f5c03938fa9d6a9524c3b859a95d3a540ee.tar.gz UXP-140e3f5c03938fa9d6a9524c3b859a95d3a540ee.tar.lz UXP-140e3f5c03938fa9d6a9524c3b859a95d3a540ee.tar.xz UXP-140e3f5c03938fa9d6a9524c3b859a95d3a540ee.zip |
Remove arbitrary NPAPI plugin whitelist for 64-bit.
This resolves #204.
Diffstat (limited to 'dom/plugins/base/nsPluginHost.cpp')
-rw-r--r-- | dom/plugins/base/nsPluginHost.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 5fb265efc..bd71d6f65 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2024,45 +2024,9 @@ struct CompareFilesByTime } // namespace -bool -nsPluginHost::ShouldAddPlugin(nsPluginTag* aPluginTag) -{ -#if defined(XP_WIN) && (defined(__x86_64__) || defined(_M_X64)) - // On 64-bit windows, the only plugins we should load are flash and - // silverlight. Use library filename and MIME type to check. - if (StringBeginsWith(aPluginTag->FileName(), NS_LITERAL_CSTRING("NPSWF"), nsCaseInsensitiveCStringComparator()) && - (aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-shockwave-flash")) || - aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-shockwave-flash-test")))) { - return true; - } - if (StringBeginsWith(aPluginTag->FileName(), NS_LITERAL_CSTRING("npctrl"), nsCaseInsensitiveCStringComparator()) && - (aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight-test")) || - aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight-2")) || - aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight")))) { - return true; - } - // Accept the test plugin MIME types, so mochitests still work. - if (aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-test")) || - aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-Second-Test")) || - aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-java-test"))) { - return true; - } -#ifdef PLUGIN_LOGGING - PLUGIN_LOG(PLUGIN_LOG_NORMAL, - ("ShouldAddPlugin : Ignoring non-flash plugin library %s\n", aPluginTag->FileName().get())); -#endif // PLUGIN_LOGGING - return false; -#else - return true; -#endif // defined(XP_WIN) && (defined(__x86_64__) || defined(_M_X64)) -} - void nsPluginHost::AddPluginTag(nsPluginTag* aPluginTag) { - if (!ShouldAddPlugin(aPluginTag)) { - return; - } aPluginTag->mNext = mPlugins; mPlugins = aPluginTag; @@ -3192,10 +3156,6 @@ nsPluginHost::ReadPluginInfo() MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC, ("LoadCachedPluginsInfo : Loading Cached plugininfo for %s\n", tag->FileName().get())); - if (!ShouldAddPlugin(tag)) { - continue; - } - tag->mNext = mCachedPlugins; mCachedPlugins = tag; } |