Mon 11 Jan 2016 03:04:23 PM UTC, comment #4:
Patch included, see patch #8851.
`getvariable-allver.html` output before applying the patch:
You'd see that under SWF5 and SWF6, `undefined` value of `unassigned_variable`
are translated to string "undefined", which is incorrect.
`getvariable-allver.html` output after applied the patch:
You'd see that output from patched Gnash is identical to output from Flash Player.
Gnash: 0.8.11dev (patched against git 15d61a8 26-Dec-2015)
Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
|
Mon 11 Jan 2016 02:20:17 PM UTC, comment #3:
I have also done some more test regarding behavior of `GetVariable()` when
fetching variable from sub-MovieClip loaded from a different SWF file
which uses a different SWF version (e.g. one loaded via `loadMovieNum()`).
Result is Flash Player acts on root movie's SWF version, not the version
of SWF that is loaded as the sub-MovieClip. That is when root movie is SWF7
and sub-movie is SWF5, `GetVariable()` will use SWF7 behavior. When root movie
is SWF5 and sub-movie is SWF7, `GetVariable()` will use SWF5 behavior.
Test file, text output, and screenshot from Flash Player are attached
as `getvariable-extmovie.zip` for reference.
Note: This test code does not work on current Gnash due to path notation
part of bug #42395, which caused `GetVariable()` to fail on sub-MovieClip.
Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
(file #35990)
|
Mon 11 Jan 2016 07:36:39 AM UTC, comment #2:
I have created a new test which checks `GetVariable()` on undefined
(unassigned) and nonexistent variable within SWF version 5-8 under Flash Player:
- Under SWF 5-6, `undefined` value translates to an empty string.
- Under SWF 7-8, `undefined` value translates to a string "undefined".
This is consistent to Adobe's documentation regarding `undefined` value
and Gnash's `as_value::to_string()` documentation, and also means that
current automated test must also be corrected so that expected value from
undefined/unassigned variable SWF6 is the same as SWF5.
Test SWF, source code, build script, HTML container, text output
and screenshot are attached as `getvariable-allver.zip` for reference.
Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
(file #35985)
|
Sat 19 Dec 2015 04:33:41 PM UTC, original submission:
This is a spin-off from bug #42395 (EFF panopticlick GetVariable issue).
As mentioned in bug #42395 comment 16, Flash Player return a value of
unassigned variable or variable with `undefined` value via `GetVariable()`
plugin call as an empty string if the running SWF was targeted to Flash 5.
Current Gnash returns a string "undefined", which is incorrect.
Two automated checks of this behavior on Gnash testsuite are provided in
`extgetvariable_testrunner`, currently giving XFAIL status.
One of them is also the same check used for verifying bug #45840
(timeline unassigned variable issue)'s behavior on SWF5.
Although Gnash's `GetVariable()` implementation could be rigged
to give an empty string under said condition as a stopgap measure,
it might need some testing to check if any specific nature of
`undefined` variable value under SWF5 (and below) caused this behavior,
so the underlying behavior difference (if any) could be fixed.
Note: If SWF version is higher than 5, Flash Player will return
a string "undefined" for such variable; current Gnash followed this correctly.
Gnash: 0.8.11dev (git 4c03566 19-Dec-2015) NPAPI
Adobe Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
|