QQuickImageProvider's uri escaping can break image://albumart uris

Bug #1237829 reported by Paweł Stołowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-shell (Ubuntu)
Fix Released
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
Medium
Michael Zanetti

Bug Description

While implementing https://code.launchpad.net/~unity-team/unity8/albumart-provider/+merge/189923 we observed an undesired behavior of QML/QQuickImageProvider which can break albumart uris that contain '/' as part of the string (e.g. "AC/DC" for the artist).

The code we implemented in iconutils.cpp uses QUrl::toPercentEncoding() to encode album and artist separately and then return "image://albumart/<encodedartist>/<encodedalbum>" uri to the shell (e.g "image://albumart/AC%2FDC/FooAlbum"). However, when AlbumArtProvider receives it in requestImage(..), it's all decoded ("AC/DC/FooAlbum"), even though a quick investigation showed that the string passed to requestImage by Qt is result of url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1), which doesn't touch the content. So, it seems like Qt decodes it already somewhere else. We should determine if this is a bug in Qt (and we can fix it?), or if we need a different approach / workaround for passing artist/album (such as using an uncommon character to separate album and artist, and not rely on encoding).

Related branches

description: updated
summary: - QImageProvider's uri escaping breaks image://albumart uris
+ QQuickImageProvider's uri escaping can break image://albumart uris
Michał Sawicz (saviq)
Changed in unity8:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Albert Astals Cid (aacid)
Revision history for this message
Albert Astals Cid (aacid) wrote :

imho we should use proper urls
image://albumart?Artist=foo&Title=bar

That ought to keep the percent encoded stuff of the variables properly encoded

Changed in unity8:
status: Triaged → In Progress
assignee: Albert Astals Cid (aacid) → Michael Zanetti (mzanetti)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity8 at revision 536, scheduled for release in unity8, milestone phone-v1-freeze

Changed in unity8:
status: In Progress → Fix Committed
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.6 KiB)

This bug was fixed in the package unity8 - 7.84+14.04.20131128.2-0ubuntu1

---------------
unity8 (7.84+14.04.20131128.2-0ubuntu1) trusty; urgency=low

  [ Michal Hruby ]
  * Depend on the separate scopes plugin
  * Move the BottomBar* DBus communicator to the Utils plugin.

  [ Michał Sawicz ]
  * Wait for DashHome to be available in tst_Shell. (LP: #1254898)
  * Use plugindir from unity-shell-api.pc.
  * Expect stop in upstart job and raise in case of surfaceflinger. (LP:
    #1239876)

  [ Albert Astals ]
  * Fix time test in Qt 5.2 Make factors an array instead of a
    object/dict Objects/dicts are unordered by definition, it happened
    that Qt 5.0 gave them in the orrder we wanted, but with Qt 5.2 is
    failing, and we don't even need the "key", so array works as well
    :).
  * Test that the dash hswipe is disabled while the inner stuff is
    moving .
  * Skip restMaximizeVisibleAreaMoveUpAndShowHeader, it's causing too
    many failed runs And we are confident it's failing because of the
    suboptimal scenegraph run in 5.0.x.
  * Make Dash::test_show_scope_on_load more robust If we are testing
    showScopeOnLoaded make sure we force a scope reload after we set it,
    otherwise it may just happen that the scope has already been loaded
    and the expectaction that we'll change the list to it is just wrong.
  * Dash renderer signals: No need to pass the model up and down Whoever
    is listening to the signal has access to the item that emits the
    signal and has the model right there accessible if needs it.
  * LVWPH: Fix header going bad when setContentHeight ends up moving the
    viewport How to reproduce the bug easily without the patch: * In the
    Dash Home, search for london * Scroll to the bottom * Start moving
    to the apps scope very slowly * At around 3/4 of the move you'll see
    the header in the home scope went to a bad position * Go back to the
    Dash Home. (LP: #1237942, #1246351)
  * Remove unused AppInfo and VideoInfo files .
  * Kill unused ApplicationsFilterGrid.qml .
  * Unify ScopeView and GenericScopeView .
  * Fix header getting lost as per bug 1245824. (LP: #1245824)
  * Remove unused Time.js and its test .
  * Do not include the QtQml megaheader Include only qqml.h which is
    what we need in these files.
  * Don't do stuff if our parent context is gone We'll be gone soon too
    (and crash probably) so don't do anything. This looks a bit like a
    workaround, wait for 5.2 better painting/dispatching loop to see if
    this is not needed anymore, we find a better way to do it, or we
    decide this is fine.

  [ Lars Uebernickel ]
  * Allow setting different indicator positions for different profiles.

  [ Mirco Müller ]
  * Added checkbox for toggling between echo-modes of password-
    entryfields in ext. snap-decisions.
  * Fixes bug #1200569. (LP: #1200569)

  [ Andrea Cimitan ]
  * Switch to application scope when a dash swipe is taking place and an
    app is on foreground. (LP: #1231996)
  * Shifts wallpaper rendering for greeter lockscreen to be inline with
    shell. (LP: #1231731)
  * Dinamically load the Carousel/Filtergrid with more than 6 items.
    (LP: #1226288, #1234105)
  * R...

Read more...

Changed in unity8 (Ubuntu):
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
Changed in unity8:
status: Fix Committed → Fix Released
Changed in unity-scopes-shell (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-scopes-shell - 0.1.1+14.04.20131209-0ubuntu1

---------------
unity-scopes-shell (0.1.1+14.04.20131209-0ubuntu1) trusty; urgency=low

  [ Michal Hruby ]
  * Prepare for PPA release
  * Backport fix for lp:1237829 from lp:unity8. (LP: #1237829)
  * Re-register categories, which causes the template and components to
    be updated.

  [ Michael Zanetti ]
  * Add MusicPreviewTrackModel in order to expose tracks in a music
    preview properly.
  * use appId for app activation instead of .desktop file path.

  [ Michał Sawicz ]
  * Use the minimal platform for tests.

  [ Albert Astals ]
  * Add a title role This way this model can be fed directly to the new
    TabBar api.

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 27
 -- Ubuntu daily release <email address hidden> Mon, 09 Dec 2013 02:58:19 +0000

Changed in unity-scopes-shell (Ubuntu):
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
assignee: nobody → Michael Zanetti (mzanetti)
importance: Undecided → Medium
no longer affects: unity8
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.