Message 82215 - Python tracker (original) (raw)
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; filename0="Re: [Mailman-Users] Messages shunted with "TypeError: "; filename1="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.