Flash version is reported incorrectly to firefox

Bug #1313457 reported by Chris Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pipelight
Fix Released
Medium
Michael Müller

Bug Description

I am attempting to switch my pipelight setup from chromium to firefox due to the NPAPI removal, but I can't get firefox to prefer the pipelight flash plugin over the native flash plugin (and firefox doesn't let me disable one without disabling both).

Chromium is working because it extracts the version from the Description, explicitly stripping the "Shockwave Flash" prefix. Firefox, on the other hand, calls NP_GetPluginVersion, which is implemented by pipelight but returns the description string. When firefox compares "Version: Shockwave Flash 13.0 r0" and "Version: 11.2.202.346", the latter wins. Also, the "fakeVersion" config directive doesn't help because it isn't checked in NP_GetPluginVersion.

I believe the solution is to retrieve and store the plugin version (e.g. "13.0.0.182") in src/windows/pluginloader.c:initDLL and return that from NP_GetPluginVersion.

I am using Fedora 20, Firefox 28.0, wine-1.7.16, and Pipelight 0.2.6 (but I've been looking at git master).

Revision history for this message
Michael Müller (mqchael) wrote :

Hi Chris,

you are right that there was a bug in this part of the code. The gathering of the plugin information was one of the first code snippets I wrote when I started the development of Pipelight and I used Chrome for testing. The way in which the plugin information is retrieved is very different between Windows / Linux and I tried to make them match between both systems. I also tested it with Firefox, but we only supported Silverlight at the beginning and for Silverlight the description and the version number are identical, so this bug was not discovered. I think nobody checked this code again.

I just looked up how Firefox determines the version number and mimed the behavior from http://lxr.mozilla.org/mozilla-release/source/dom/plugins/base/nsPluginsDirWin.cpp#94 so that it exactly matches the version number from Windows. Now Firefox automatically uses Pipelight Flash as it has a bigger version number. I also modified the behavior of fakeVersion so that it affects both the description and the version number used by Firefox. This is not completely correct, but splitting the value into fakeDescription and fakeVersion would break old configs and it is currently only used for Silverlight which does not distinguish between both values.

Feel free to build the current git version and check if you see any further problems.

Michael

Changed in pipelight:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Michael Müller (mqchael)
Changed in pipelight:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.