[issue12411] cgi.parse_multipart is broken on 3.x
Tal Einat
report at bugs.python.org
Mon Jul 4 09:55:58 CEST 2011
Tal Einat <taleinat at gmail.com> added the comment:
The patch seems broken to me.
In cgi.parse_multipart(), the 'boundary' variable can be a string even though it is concatenated to bytes. Its default value is a string, and a string can be given via the pdict argument. There is no validity check other than valid_boundary(), which allows both string and bytes.
Most of the changes to test_cgi.py are entirely unrelated. The one test added which tests cgi.parse_multipart() should fail since it uses a string (not bytes) boundary, while the correct boundary for the test is commented out.
I short this patch seems half-baked. IMO reject this patch and fix just the bytes/strings issue with cgi.parse_multipart. Or, as mentioned in the comments, use FieldStorage to implement it and be done with it.
----------
nosy: +taleinat
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12411>
_______________________________________
More information about the Python-bugs-list
mailing list