UnicodeDecodeError in sane_enviromnent closes the connection
Bug #852205 reported by
Francis J. Lacoste
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:/
"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
lp:~sinzui/launchpad/path-info-bad-request
- William Grant: Approve (code)
-
Diff: 39 lines (+18/-0)2 files modifiedlib/lp/services/webapp/servers.py (+9/-0)
lib/lp/services/webapp/tests/test_servers.py (+9/-0)
tags: | added: webapp-infrastructure |
Changed in launchpad: | |
assignee: | nobody → Curtis Hovey (sinzui) |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.