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 cito
Recipients Aron Podrigal, Bert JW Regeer, Decorater, Fran Boon, Tim Nyborg2, X-Istence, berker.peksag, bnmnetp, cito, elgow, ethan.furman, jackjansen, kulikjak, ned.deily, quentel, remi.lapeyre, rr-, srittau, watusimoto
Date 2021-02-28.12:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614516436.52.0.733053752069.issue27777@roundup.psfhosted.org>
In-reply-to
Content
Just created a test case for this problem after a pentest provoked this error on one of my web apps. Then I found this bug report which already has a similar test case attached.

The problem is that read_binary() as the name says reads binary data, but then writes it to a file which may or may not be binary, depending on whether self._binary_file is set, which depends on whether a filename was set via the content-disposition header.

Jakub's patch looks good and works for me. Please merge this!
History
Date User Action Args
2021-02-28 12:47:16citosetrecipients: + cito, jackjansen, srittau, ned.deily, ethan.furman, quentel, X-Istence, berker.peksag, Decorater, rr-, remi.lapeyre, watusimoto, Bert JW Regeer, kulikjak, Aron Podrigal, elgow, Fran Boon, Tim Nyborg2, bnmnetp
2021-02-28 12:47:16citosetmessageid: <1614516436.52.0.733053752069.issue27777@roundup.psfhosted.org>
2021-02-28 12:47:16citolinkissue27777 messages
2021-02-28 12:47:15citocreate