No way to disable quoting playable uris

Bug #491874 reported by Michał Sawicz
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Critical
Olivier Tilloy

Bug Description

When giving the player a uri, it is always quoted. This is fine for most cases, but there are those that break. For example:

http://bitcast.vimeo.com/vimeo/v/104/248/10424819.mp4?e=1259849985&h=c6e2ddf3f3be5b53e22f0c08f4db47b5

is quoted into

http://bitcast.vimeo.com/vimeo/v/104/248/10424819.mp4%3Fe%3D1259849985%26h%3Dc6e2ddf3f3be5b53e22f0c08f4db47b5

and Vimeo servers respond to that with a 403 error.

This quoting is performed in elisa-plugins/elisa/plugins/poblesec/video_player.py:811. Either the quoting should leave '?&=' in place or the playable model should have a .dont_quote property which would prevent quoting if True.

Tags: playback

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :

I cannot reproduce with Vimeo videos specifically, although I can observe that quoting the example URI that you give indeed fails.

Here is what happens when I try to play e.g. the first video of the HD channel ("Phoenix - 1901 - A Take Away Show"):
 - unquoted URL: http://vimeo.com/moogaloop/play/clip:7942520/063aa13b9e53ae2fa551a8f7cdeca33b/1259933400/?q=hd
 - quoted URL: http://vimeo.com/moogaloop/play/clip:7942520/063aa13b9e53ae2fa551a8f7cdeca33b/1259933400/%3Fq%3Dhd

which is then successfully redirected to http://bitcast.vimeo.com/vimeo/v2/125/878/12587819.mp4?e=1259934410&h=c94226a1f866b49aaf12be4cf7f4a3f2

Revision history for this message
Michał Sawicz (saviq) wrote :

You can't reproduce with Vimeo because I have commented out the failing code, and as per our discussion yesterday it seems it wasn't even needed because my problems were caused by a faulty gstreamer install.

Nevertheless, it should be possible to inhibit the quoting or override the allowed characters, maybe.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Can be observed in the grooveshark plugin. Steps to reproduce (from bug #493571):

1. Launch Moovida
2. Go to Grooveshark plugin->Popular->Songs
3. Try to play any song

Changed in moovida:
importance: Undecided → Critical
status: New → Confirmed
tags: added: playback
Revision history for this message
Olivier Tilloy (osomon) wrote :

Note that in bug #502488 Guillaume proposes a patch that consists in adding "special" characters (";/?:@&=+$,") to the unescape list. It sounds like a valid solution for standard remote resources, but will most likely fail for local files, for which the original escaping has been introduced.
IMHO, the escaping should be done for local files only, before building MediaUri objects. Not in the player's code.

Revision history for this message
Guillaume Desmottes (cassidy) wrote :

I think the proper way to fix this would be either to escape *before* creating the MediaUri as you suggested or to escape each parameter individually in the MediaUri object before reconstructing the URI string (that way the param delimiters won't be escaped).

Olivier Tilloy (osomon)
Changed in moovida:
assignee: nobody → Olivier Tilloy (osomon)
milestone: none → bug-fixing-day
status: Confirmed → In Progress
Olivier Tilloy (osomon)
Changed in moovida:
status: In Progress → Fix Committed
Revision history for this message
Olivier Tilloy (osomon) wrote :

The following plugin updates have been published in the plugin repository to fix the issue:
 - gstreamer 0.12.1
 - poblesec 0.21.1

Olivier Tilloy (osomon)
Changed in moovida:
status: Fix Committed → Fix Released
Olivier Tilloy (osomon)
Changed in moovida:
milestone: bug-fixing-day → 1.0.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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