UnicodeDecodeError in sane_enviromnent closes the connection

Bug #852205 reported by Francis J. Lacoste
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Curtis Hovey
zope.publisher
Invalid
Undecided
Unassigned

Bug Description

sane_environment() assumes that PATH_INFO is UTF-8 encoded. Using incorrect UTF-8 in the URL will raise a UnicodeDecodeError that will never be catch by the publisher (and handleException() won't be called).

For example, in Launchpad going to https://bugs.launchpad.net/mahara/+bug/630891%E4/+index produces a
  "Please try again" message (%E4 is not valid utf-8).

It should show either a 404 page (because the page doesn't exist) or a 400 because the URL is wrongly encoded.

Related branches

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Tagging as oops even though technically, we don't record one. But a 'Please try again' page is as bad from the user point of view.

tags: added: oops
William Grant (wgrant)
tags: added: webapp-infrastructure
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
j.c.sackett (jcsackett)
Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope.publisher project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope.publisher.

Changed in zope.publisher:
status: New → Invalid
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.