Closed Bug 564820 Opened 16 years ago Closed 16 years ago

UnicodeDecodeError in Django's CommonMiddleware

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbalogh, Assigned: jbalogh)

References

()

Details

(Whiteboard: [z][qa-])

No description provided.
'QUERY_STRING': 'src=\xc2\xbcwhscheck\xc2\xbe', 'REQUEST_URI': '/z/en-US/firefox/addon/60?src=\xc2\xbcwhscheck\xc2\xbe', Traceback (most recent call last): File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 80, in get_response response = middleware_method(request) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/django/middleware/common.py", line 78, in process_request newurl += '?' + request.META['QUERY_STRING'] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5: ordinal not in range(128) Let's fix this bug in zamboni now and then tell Django about how they're broken.
Summary: UnicodeDecodeError → UnicodeDecodeError in Django's CommonMiddleware
Target Milestone: 5.10.2 → 5.10.3
clouserw says this is from whitehat scanning. It's not affecting real users, so it can wait.
Target Milestone: 5.10.3 → 5.11
it's still some rookie shiz, we should fix it
Assignee: nobody → jbalogh
I can't reproduce this at the given url, and from what I can tell QUERY_STRING is always a byte string. clouserw: Do you know the exact url that whitehat is hitting us with here?
(In reply to comment #4) > I can't reproduce this at the given url, and from what I can tell QUERY_STRING > is always a byte string. > > clouserw: Do you know the exact url that whitehat is hitting us with here? The URL in comment 1 doesn't work because \x is denoting special characters. They have a few in there that we ignore, but an umlaut is breaking us here. Try: https://preview.addons.mozilla.org/z/en-US/firefox/addon/60/?src=wenzellikes%C3%BC
Priority: -- → P2
How do I turn these \x codes into characters that I can use to reproduce the error? Another one: /z/ja/firefox/addon/9591?collection_uuid=6102d914-b53f-3ae7-a742-e744a003c044\xc3\xa3\xe2\x82\xac\xe2\x82\xac\xc3\xa3\xe2\x80\x9a\xc2\xb3\xc3\xa3\xc6\x92\xc2\xac\xc3\xa3\xc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\xc2\xaa\xc3\xa3\xc2\x81\xe2\x80\x94\xc3\xaf\xc2\xbc\xc2\x81'.decode('utf-8')
http://github.com/jbalogh/zamboni/commits/896cfa62e [qa-] since I only know how to reproduce it in tests, not in the browser.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [z] → [z][qa-]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.