1
0
MozillaFirefox/mozilla-prefer_plugin_pref.patch
Wolfgang Rosenauer 662e67c339 - update to Firefox 17.0 (bnc#790140)
* MFSA 2012-91/CVE-2012-5842/CVE-2012-5843
    Miscellaneous memory safety hazards
  * MFSA 2012-92/CVE-2012-4202 (bmo#758200)
    Buffer overflow while rendering GIF images
  * MFSA 2012-93/CVE-2012-4201 (bmo#747607)
    evalInSanbox location context incorrectly applied
  * MFSA 2012-94/CVE-2012-5836 (bmo#792857)
    Crash when combining SVG text on path with CSS
  * MFSA 2012-95/CVE-2012-4203 (bmo#765628)
    Javascript: URLs run in privileged context on New Tab page
  * MFSA 2012-96/CVE-2012-4204 (bmo#778603)
    Memory corruption in str_unescape
  * MFSA 2012-97/CVE-2012-4205 (bmo#779821)
    XMLHttpRequest inherits incorrect principal within sandbox
  * MFSA 2012-99/CVE-2012-4208 (bmo#798264)
    XrayWrappers exposes chrome-only properties when not in chrome
    compartment
  * MFSA 2012-100/CVE-2012-5841 (bmo#805807)
    Improper security filtering for cross-origin wrappers
  * MFSA 2012-101/CVE-2012-4207 (bmo#801681)
    Improper character decoding in HZ-GB-2312 charset
  * MFSA 2012-102/CVE-2012-5837 (bmo#800363)
    Script entered into Developer Toolbar runs with chrome privileges
  * MFSA 2012-103/CVE-2012-4209 (bmo#792405)
    Frames can shadow top.location
  * MFSA 2012-104/CVE-2012-4210 (bmo#796866)
    CSS and HTML injection through Style Inspector
  * MFSA 2012-105/CVE-2012-4214/CVE-2012-4215/CVE-2012-4216/
    CVE-2012-5829/CVE-2012-5839/CVE-2012-5840/CVE-2012-4212/

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=303
2012-11-20 20:34:15 +00:00

59 lines
1.9 KiB
Diff

From: Ubuntu
Subject: introduce a pref to prefer certain plugins for mime-types
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -1588,17 +1588,51 @@ nsPluginHost::FindPluginForType(const ch
if (!aMimeType) {
return nullptr;
}
LoadPlugins();
InfallibleTArray<nsPluginTag*> matchingPlugins;
+ char *preferredPluginPath = NULL;
+ nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
+ mimetypePrefString.Append(aMimeType);
+ const char *mimetypePrefChar = mimetypePrefString.get();
+ nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar);
+ preferredPluginPath = (char*) pluginPath.get();
+
nsPluginTag *plugin = mPlugins;
+
+ if(preferredPluginPath) {
+ while (plugin) {
+ if (!aCheckEnabled || plugin->IsEnabled()) {
+ if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) ||
+ 0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) {
+ matchingPlugins.AppendElement(plugin);
+ }
+ }
+ plugin = plugin->mNext;
+ }
+
+ // now lets search for substrings
+ plugin = mPlugins;
+ while (plugin) {
+ if (!aCheckEnabled || plugin->IsEnabled()) {
+ if (nullptr != PL_strstr(plugin->mFileName.get(), preferredPluginPath) ||
+ nullptr != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) {
+ matchingPlugins.AppendElement(plugin);
+ }
+ }
+ plugin = plugin->mNext;
+ }
+
+ return FindPreferredPlugin(matchingPlugins);
+ }
+
while (plugin) {
if (!aCheckEnabled || plugin->IsEnabled()) {
int32_t mimeCount = plugin->mMimeTypes.Length();
for (int32_t i = 0; i < mimeCount; i++) {
if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) {
matchingPlugins.AppendElement(plugin);
break;
}