quoting issues with rnrclient/rnr-server

Bug #714582 reported by Michael Vogt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
Fix Released
Medium
Michael Vogt

Bug Description

There are currently issues with the quoting around rnr-server and rnrclient.

In the current staging server there are two problematic apps:
u"Déjà Dup Backup Tool"
and
"Blender (windowed)"

For dejadup it appears the code needs to be:
    appname=u"D\u00e9j\u00e0 Dup Backup Tool"
    reviews= rnr.get_reviews(language="en",origin="ubuntu",
                             distroseries="natty",
                             packagename="deja-dup",
                             appname=appname.encode("utf-8"))
This will translate to:
$ curl 'https://reviews.stging.ubuntu.com/reviews/api/1.0/en/ubuntu/natty/deja-dup%3bD%c3%a9j%c3%a0+Dup+Backup+Tool/'

But blender needs a quote_plus:
    appname=u"Blender (windowed)"
    reviews= rnr.get_reviews(language="en",origin="ubuntu",distroseries="natty",
                             packagename="blender",
                             appname=quote_plus(appname))
in order to find data.

get_reviews() will call quote_plus() too, it appears that the server is doing a double unquote_plus in api/handlers.py:101

Revision history for this message
Michael Vogt (mvo) wrote :

There is a fix for this in:
lp:~mvo/rnr-server/avoid-double-unquoting

Its in trunk but not deployed on reviews.staging.ubuntu.com yet.

Changed in rnr-server:
status: New → In Progress
importance: Undecided → Medium
Changed in rnr-server:
assignee: nobody → Michael Vogt (mvo)
status: In Progress → Fix Committed
Michael Vogt (mvo)
Changed in rnr-server:
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.