+login page OOPSes if query string has accented chars encoded as ASCII

Bug #61171 reported by Diogo Matsubara
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Apport
Invalid
Undecided
Unassigned
Launchpad itself
Fix Released
Low
Guilherme Salgado

Bug Description

New instance on edge 20100723 : https://launchpad.net/bugs/609029 -- oops tools links here wrongly.

+login page OOPSes if query string has accented chars encoded as ASCII

This happens when apport generates URLs for users to file new bugs, as the URLs are ASCII-encoded and the title it uses for the bug may contain non-ASCII characters. The code responsible for this seems to be in the get_comment_url() method of apport.crashdb_impl.launchpad.CrashDatabase

It also happens in other cases (as we can see on the OOPSes on shipit.ubuntu.com), but I can't find a way to reproduce them. (All the ones on shipit.ubuntu.com seem to come from the http://en.wikipedia.org/wiki/Tencent_Traveler browser)

Launchpad must be changed to not OOPS in these cases, but I don't think there's anything for us to do other than replacing these non-ASCII characters.

As seen on OOPS-218A455:

  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 113: ordinal not in range(128)

More: OOPS-1012D3679, OOPS-1012C3634, OOPS-1020F2542, OOPS-1020B2905, OOPS-1020C2146, OOPS-228B96, OOPS-228A85, OOPS-228B99, OOPS-228B100, OOPS-228A88, OOPS-239B555, OOPS-253B899, OOPS-260A228, OOPS-253C843, OOPS-253D917, OOPS-260D211, OOPS-260A228, OOPS-579C1318, OOPS-1220A1603

Steps to reproduce:

1. Start launchpad.dev
2. Log out of launchpad.dev
3. Visit the following link in the address bar (note the % characters):
  https://bugs.launchpad.dev/firefox/+filebug/+login?field.title=package+uml-utilities+20070815-1.1ubuntu2+failed+to+install%2Fupgrade%3A+el+subproc%E9s+post-installation+script+retorn%E0+el+codi+d%27eixida+d%27error+1

(note that the above is the field.title from one of the OOPS requests)

description: updated
description: updated
Ursula Junque (ursinha)
description: updated
Ursula Junque (ursinha)
description: updated
Ursula Junque (ursinha)
description: updated
Ursula Junque (ursinha)
description: updated
Revision history for this message
Māris Fogels (mars) wrote :

It looks like this is happening when logging in, while attempting to file a bug that has unicode characters in the title.

description: updated
Revision history for this message
Māris Fogels (mars) wrote :

The best solution is likely to change launchpad.webapp.login.LoginOrRegister.iter_form_items() so that it yields unicode objects, instead of ascii strings.

Revision history for this message
Ursula Junque (ursinha) wrote :

Salgado will try to fix this as soon as possible.

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Guilherme Salgado (salgado)
milestone: none → 2.2.8
description: updated
summary: - UnicodeDecodeError in preserve_query() method.
+ +login page OOPSes if query string has accented chars encoded as ASCII
description: updated
visibility: private → public
description: updated
description: updated
Changed in launchpad-foundations:
status: Triaged → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r9049.

Changed in launchpad-foundations:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Diogo; If LP can digest these URLs now, it seems I don't need to change anything in apport.

Changed in apport:
status: New → Invalid
Revision history for this message
Diogo Matsubara (matsubara) wrote : Re: [Bug 61171] Re: +login page OOPSes if query string has accented chars encoded as ASCII

On Fri, Sep 4, 2009 at 7:30 AM, Martin Pitt<email address hidden> wrote:
> Thanks Diogo; If LP can digest these URLs now, it seems I don't need to
> change anything in apport.

Thanks to Salgado. He fixed it. My script only closed the bug. :-)

>
> ** Changed in: apport
>       Status: New => Invalid
>
> --
> +login page OOPSes if query string has accented chars encoded as ASCII
> https://bugs.launchpad.net/bugs/61171
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Diogo M. Matsubara

Changed in launchpad-foundations:
status: Fix Committed → Fix Released
description: updated
description: updated
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.