Closed Bug 1097147 Opened 11 years ago Closed 11 years ago

Unicode errors on query strings with the redirect middleware

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2015-01

People

(Reporter: davidbgk, Assigned: magopian)

References

Details

(Whiteboard: [qa-])

See http://sentry.mktmon.services.phx1.mozilla.com/mkt/addonsmozillaorg/group/5515/ Stacktrace (most recent call last): File "django/core/handlers/base.py", line 88, in get_response response = middleware_method(request) File "amo/middleware.py", line 66, in process_request response = redirect_type(full_path) File "django/http/response.py", line 457, in __init__ parsed = urlparse(force_text(redirect_to)) File "django/utils/encoding.py", line 116, in force_text raise DjangoUnicodeDecodeError(s, *e.args) DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0x85 in position 67: invalid start byte. You passed in '/en-US/firefox/collections/mozmj/autumn/?source=firefoxsocialmedia\x14\x85' (<type 'str'>)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reverted in https://github.com/mozilla/olympia/pull/364 because Python 2.6 doesn't allow errors='ignore'. It will probably end with a try/except dropping the query_string in case of error.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1013867
Assignee: david → nobody
Target Milestone: 2014-11 → 2014-12
PR https://github.com/mozilla/olympia/pull/403 The only thing not supported in py26 is the use of named parameters in the decode function, so that's the only thing I changed ;)
Assignee: nobody → mathieu
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Target Milestone: 2014-12 → 2015-01
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.