Message139742
| Author |
taleinat |
| Recipients |
MHordecki, efosmark, eric.araujo, flox, jonas.wagner, milesck, quentel, r.david.murray, taleinat, vstinner |
| Date |
2011年07月04日.07:55:57 |
| SpamBayes Score |
1.2092372e-10 |
| Marked as misclassified |
No |
| Message-id |
<1309766158.51.0.913937293985.issue12411@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|