[New-bugs-announce] [issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

Anthony Sottile report at bugs.python.org
Fri Apr 8 16:48:05 EDT 2016


New submission from Anthony Sottile:

Patch attached with test.

In summary:

A request to the url b'/\x80' appears to the application as a request to b'\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as UTF-8 and then decoded as latin1

(on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)-> b'\xc2\x80' -(decode latin1)-> b'\xc2\x80'

My patch cuts out the encode(utf-8)->decode(latin1)

----------
components: Library (Lib)
files: patch
messages: 263043
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42402/patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26717>
_______________________________________


More information about the New-bugs-announce mailing list