Bug 105012 - Comments in Content-Transfer-Encoding are not ignored
Summary: Comments in Content-Transfer-Encoding are not ignored
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-03 13:34 UTC by Rolf Eike Beer
Modified: 2012-06-18 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2005-05-03 13:34:12 UTC
Version:           1.1 (using KDE 3.4.0 Level "b" , SUSE 9.3)
Compiler:          gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
OS:                Linux (i686) release 2.6.11-rc1

RfC 2045, page 4:

All of the header fields defined in this document are subject to the
general syntactic rules for header fields specified in RFC 822.  In
particular, all of these header fields except for Content-Disposition
can include RFC 822 comments, which have no semantic content and
should be ignored during MIME processing.

RfC 822, page 10:

comment     =  "(" *(ctext / quoted-pair / comment) ")"

Test case:

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

=C3=B6 =C3=A4 =C3=BC=20
	bla=09
=09
=20
---

The body is displayed "raw" by KMail/Kontact. Removing the comment brings back proper display of the mail.
Comment 1 Rolf Eike Beer 2006-06-14 15:11:03 UTC
The buggy function is "void DwMechanism::StringToEnum()" in kdepim/mimelib/mechansm.cpp which matches against the whole string without stripping comments first.
Comment 2 Tim Weber 2006-07-03 09:06:05 UTC
This bug still appears btw in KMail 1.9.1 (shipped with KDE 3.5.2).
Comment 3 Björn Ruberg 2009-12-21 12:00:30 UTC
Is this still a problem?
Comment 4 Rolf Eike Beer 2012-06-18 20:55:52 UTC
Works in 4.8.4 now.