InvalidURL OOPS in translatePath because of URL containing non-ascii chars

Bug #330211 reported by Ursula Junque
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Hudson-Doyle

Bug Description

As seen on OOPS-1141XMLP5:

InvalidURL: Invalid url supplied to transport: "\xe9\x9d\x99\xe6\x80\x81/\xe5\x9b\xbe\xe5\x83\x8f/ treeCollapsed.png": URL was not a plain ASCII url: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

Also: OOPS-1159XMLP39, OOPS-1159XMLP18, OOPS-1159XMLP29, OOPS-1188XMLP24, OOPS-1188XMLP25, OOPS-1188XMLP27, OOPS-1188XMLP31, OOPS-1188XMLP9, OOPS-1220XMLP5, OOPS-1220XMLP6, OOPS-1220XMLP10

Tags: lp-code oops
Revision history for this message
Ursula Junque (ursinha) wrote :

Hi Jono, can you take a look on this one, please? Thanks!

Revision history for this message
Jonathan Lange (jml) wrote :

As best as I can tell, this was caused by someone typing in random junk into their browser bar for http://bazaar.launchpad.net.

However, it appears that the rewrite map isn't escaping URLs before sending them to be translated, which is fairly serious, and fairly easy to fix.

Changed in launchpad-bazaar:
importance: Undecided → High
status: New → Triaged
Ursula Junque (ursinha)
description: updated
Revision history for this message
Jonathan Lange (jml) wrote :

The problem here is that translatePath expects to be called with a properly encoded URL. However, the rewrite map is passing it non-encoded URLs. This breaks the contract of translatePath, causing it to OOPS.

The primary fix is to make sure that the rewrite map encodes URLs properly. A possible secondary fix is for translatePath to raise better errors in these cases.

tags: removed: codehosting-ssh
Changed in launchpad-bazaar:
assignee: nobody → mwhudson
milestone: none → 2.2.4
Ursula Junque (ursinha)
description: updated
Ursula Junque (ursinha)
description: updated
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Sigh, didn't get to this.

Changed in launchpad-code:
milestone: 2.2.4 → 2.2.5
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Fixed, mostly in the Apache config.

Changed in launchpad-code:
status: Triaged → 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.