InvalidURIError raised accessing an API url

Bug #535078 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Fix Released
Critical
Unassigned

Bug Description

As seen on OOPS-1529M159, OOPS-1529D29 and OOPS-1529K525 a InvalidURIError was raised while trying to access a API URL with invalid characters on it.

Accessing such page should return a NotFound or similar and not log an OOPS report.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Re-targeted to foundations based on the trace back in the oops.

affects: soyuz → launchpad-foundations
Gary Poster (gary)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → High
milestone: none → 10.03
Gary Poster (gary)
Changed in launchpad-foundations:
milestone: 10.03 → 10.04
Revision history for this message
Leonard Richardson (leonardr) wrote :

This error occurs when https://edge.launchpad.net/~ubuntu-wine/+archive/foo is redirected to https://edge.launchpad.net/~ubuntu-wine/+archive/ppa/foo. If "foo" contains an invalid character, you get this error. If "foo" contains no invalid characters but there's no PPA by that name, you get redirected and then get a 404. If "foo" is the name of a PPA, you get redirected and then get a 200.

I think the most correct thing to do would be to let the redirect go through and let the 404 happen after the redirect. But I don't see a good way of implementing callObject's functionality without parsing the Location header and possibly causing an InvalidURIError. So maybe we should just raise NotFound upon discovering that the Location header will send the browser to a bad place.

Gary Poster (gary)
Changed in launchpad-foundations:
milestone: 10.04 → none
Changed in launchpad:
importance: High → Critical
Revision history for this message
Leonard Richardson (leonardr) wrote :

This was fixed by revision 147 (version 0.13.1) back in September.

Changed in launchpad:
status: Triaged → Fix Released
affects: launchpad → lazr.restful
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.