[Swfdec] [Bug 16716] New: swfdec doesn't handle uri encoding, leading to failures on file:///

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 14 20:37:24 PDT 2008


http://bugs.freedesktop.org/show_bug.cgi?id=16716

           Summary: swfdec doesn't handle uri encoding, leading to failures
                    on file:///
           Product: swfdec
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: library
        AssignedTo: swfdec at lists.freedesktop.org
        ReportedBy: tetromino at gmail.com
         QAContact: swfdec at lists.freedesktop.org


The symptoms: in Nautilus, double-click on a flash file that has spaces,
question marks, or non-ASCII characters in its name (e.g. "ибражы.swf").
Swfdec-player says that "%D0%B8%D0%B1%D1%80%D0%B0%D0%B6%D1%8B.swf is not a
Flash file."

The reason this is happening is that SwfdecURL is blithely ignorant of URI
encoding. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a
short introduction to the subject.

So when Nautilus calls 'swfdec-player
file:///home/me/%D0%B8%D0%B1%D1%80%D0%B0%D0%B6%D1%8B.swf', and the URL gets
passed to swfdec_url_new(), the resulting SwfdecURL ends up with
"/home/me/%D0%B8%D0%B1%D1%80%D0%B0%D0%B6%D1%8B.swf" in its path field, which
obviously doesn't exist on my hard drive, leading to failure.

There are two ways of fixing this situation.
The WRONG way would be to make swfdec-player pass invalid URIs
("file:///home/me/ибражы.swf") to work around swfdec_url's broken
behavior.

The right way is to formally specify, for EACH string parameter and return
value of swfdec_url_* functions, whether the parameter is "raw" or URI-encoded,
and to put in code to do the appropriate conversions. This needs to be thought
out carefully so as not to break existing uses too much.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the Swfdec mailing list