This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mlk
Recipients mlk, r.david.murray, v+python
Date 2011-02-25.18:46:56
SpamBayes Score 9.100222e-05
Marked as misclassified No
Message-id <1298659620.06.0.00772703045477.issue11269@psf.upfronthosting.co.za>
In-reply-to
Content
It does work (Python 2.7.1 here):

>>> import cgi
>>> cgi.parse_header('Content-Disposition: form-data; name=""%22"')
('Content-Disposition: form-data', {'name': '"%22'})
>>> cgi.parse_header('Content-Disposition: form-data; name="\\"%22"')
('Content-Disposition: form-data', {'name': '"%22'})

However as the unescaping is done sequential .replace, one can construct a header to make it unescape incorrectly:

>>> cgi.parse_header('Content-Disposition: form-data; name="\\\\"%22"')
('Content-Disposition: form-data', {'name': '"%22'})

Which should be:
('Content-Disposition: form-data', {'name': '\\"%22'})

That probably doesn't matter anyway.
History
Date User Action Args
2011-02-25 18:47:00mlksetrecipients: + mlk, v+python, r.david.murray
2011-02-25 18:47:00mlksetmessageid: <1298659620.06.0.00772703045477.issue11269@psf.upfronthosting.co.za>
2011-02-25 18:46:57mlklinkissue11269 messages
2011-02-25 18:46:57mlkcreate