Ticket #238 (closed Bugs: fixed)

Opened 9 years ago

Last modified 8 years ago

Unable to read messages with semicolons after the last parameter of a header value (POP)

Reported by: octo Owned by: octo
Priority: normal Milestone: 2.0
Component: LogicMail Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:


This is another strange MIMEInputStream bug that appears to exist in OS 4.5 through 5.0, but has been fixed in OS 6.0.

The following raw message will completely fail to return any content parts when parsed through MIMEInputStream:

Date: Thu, 22 Jul 2010 14:42:52 -0700 (PDT)
From: Test <foo@bar.com>
To: User <bar@foo.com>
Subject: Test message
Content-Transfer-Encoding: 8BIT
Content-Type: multipart/mixed; boundary="-----O77SH13D170413020610"; charset=utf-8

Content-Type: text/plain; charset=utf-8;
Content-Transfer-Encoding: quoted-printable

This is some text


In this case, the issue appears to be the parameters on the "Content-Type" header within the text/plain section. If the semicolon following the last parameter is removed, then MIMEInputStream will successfully return the content.

The safest workaround will probably involve finding all the message headers, both at the beginning and within the actual body parts, and trimming any trailing semicolons. (will need testing to see if this just affects "Content-Type", or also affects other fields.

Change History

comment:1 Changed 9 years ago by octo

  • Status changed from new to accepted
  • Owner set to octo

comment:2 Changed 8 years ago by octorian

In [926]:

MIME boundary detection fix, header value trailing colon trimming, and fix for DataBuffer getLength() usage. (refs #352, #238)

comment:3 Changed 8 years ago by octorian

  • Status changed from accepted to closed
  • Resolution set to fixed

In [927]:

Merge of bug fixes from trunk (fixes #351, #238, #352, #349)

Note: See TracTickets for help on using tickets.