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 bpoaugust
Recipients Eric Lafontaine, barry, bpoaugust, r.david.murray
Date 2016-12-22.17:16:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482426991.33.0.34036228414.issue28945@psf.upfronthosting.co.za>
In-reply-to
Content
I have just discovered the same problem with get_filename.
Not surprising as its code is basically the same as get_boundary.

Unix paths can contain anything, so it's not correct to remove special characters. [It's up to the receiving file system to decide how to deal with chars that are not valid for it; the original name must be passed unchanged]

If the quoting/unquoting is fixed for filenames, then it should be OK for the boundary as well.

I think collapse_rfc2231_value should assume that any unquoting has already been done, and should therefore not call utils.unquote at all.

The get_param() method by default unquotes both single strings and encoded triplets, so it's certainly the case that get_boundary and get_filename will pass an unquoted value to rfc2231, as will any other caller that calls get_param with the default parameters.
History
Date User Action Args
2016-12-22 17:16:31bpoaugustsetrecipients: + bpoaugust, barry, r.david.murray, Eric Lafontaine
2016-12-22 17:16:31bpoaugustsetmessageid: <1482426991.33.0.34036228414.issue28945@psf.upfronthosting.co.za>
2016-12-22 17:16:31bpoaugustlinkissue28945 messages
2016-12-22 17:16:30bpoaugustcreate