Comment 4 for bug 1953173

Revision history for this message
Lena Voytek (lvoytek) wrote :

Hi Rodrigo,

I looked into the lines and did find a possible issue.

SCRIPT_NAME and PATH_INFO should not have any issues as the scope's root_path and path are setup as strs beforehand and the conversion encoding utf8 then decoding to latin1 are well defined in this case.

However, QUERY_STRING could cause a crash if the user is able to send in an extended ASCII character with a byte value from 128-255. I tested this by sending a byte array to the function with the first value being 128, aka Ç. It crashed with the following error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)

Django will handle these requests properly without crashing when running alongside asgiref, but on its own this case is not handled.

Thanks