You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/bitdancer'closed_at=<Date2010-04-14.19:08:09.054>created_at=<Date2009-02-16.04:35:14.042>labels= ['easy', 'type-bug', 'library']
title='email message.get_params() and related methods sometimes fail.'updated_at=<Date2010-04-14.19:08:09.053>user='https://github.com/msapiro'
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.
According to RFC2231 the named disposition (content disposition field) is provided by the MIME mechanism. The encoded parameter like the following:
Content-Disposition: inline;
filename*0="Re: [Mailman-Users] Messages shunted with \"TypeError: ";
filename*1="decodingUnicode is not supported\".eml"
is not behaving the way it should be.
The patch by rcoyner seems fine to me as it rectifies the wrong behaviour of _parseparam i.e. the counting issue of nested 'double quotes' and clears the unit tests.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: