[issue5277] email message.get_params() and related methods sometimes fail.

Mark Sapiro report at bugs.python.org
Mon Feb 16 05:35:15 CET 2009


New submission from Mark Sapiro <mark at msapiro.net>:

The message method get_params() and the related get_param() and
get_filename() do not properly decode an RFC 2231 encoded parameter such
as the following:

Content-Disposition: inline;
 filename*0="Re: [Mailman-Users] Messages shunted with \"TypeError: ";
 filename*1="decodingUnicode is not supported\".eml"

This is because the message helper function _parseparams() mistakenly
thinks the second semicolon is inside a quoted string because it counts
the quoted (escaped) quote and sees an odd number.

The attached patch will fix this.

----------
components: Library (Lib)
files: message.patch
keywords: patch
messages: 82215
nosy: barry, msapiro
severity: normal
status: open
title: email message.get_params() and related methods sometimes fail.
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file13105/message.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5277>
_______________________________________


More information about the Python-bugs-list mailing list