Ticket #127 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

IMAP BODYSTRUCTURE decoding assumes Content-Type parameter ordering

Reported by: octo Owned by: octo
Priority: minor Milestone: 1.0.x
Component: LogicMail Version: 1.0.3
Keywords: 1.0.4 Cc:
Blocked By: Blocking:

Description

The decoding logic for the IMAP BODYSTRUCTURE response makes a bad assumption about the ordering of the Content-Type parameters. This issue manifests when decoding a text section, and the assumption is that the "CHARSET" parameter will be the first parameter. This is not always the case, which can lead to decoding problems.

For example, the charset will not be correctly parsed from the following:

Content-Type: text/plain;
	format=flowed;
	charset="windows-1251";
	delsp=yes

Parameter parsing needs to be order-independent, and issues like this have already been fixed elsewhere in the IMAP parser.

Change History

comment:1 Changed 3 years ago by octo

  • Status changed from new to closed
  • Keywords 1.0.4 added
  • Resolution set to fixed

Fixed in 1.0.4

Note: See TracTickets for help on using tickets.