Bug 69007 - [PATCH] Non RFC2047 conformant encoded-words
Summary: [PATCH] Non RFC2047 conformant encoded-words
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: mime (show other bugs)
Version: SVN trunk (KDE 4)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2003-11-25 13:57 UTC by Paweł Sakowski
Modified: 2015-04-12 09:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (3.31 KB, patch)
2008-11-23 21:12 UTC, Michael Leupold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Sakowski 2003-11-25 13:57:22 UTC
Version:           KMail/1.5 (using KDE KDE 3.1.4)
Installed from:    I Don't Know
OS:          Linux

I've received an e-mail sent by KMail/1.5 which included the following Subject line:

Subject: Re: wxWindows (Re: =?iso-8859-2?q?Troch=EA?=
        =?iso-8859-2?q?=20zwolni=E6?=)

My mailer (Evolution 1.4.5) refused to interpret the second encoded-word since it violates RFC 2047 section 5.(1): it isn't separated from the closing parentheses with a linear-white-space.
Comment 1 Ingo Klöcker 2003-11-25 17:44:24 UTC
I just have to add that in case of a comment there must be no linear-white-space between the encoded-word and the comment-closing parentheses.

In the above case the closing parantheses has to be encoded as part of the second encoded word.

Apparently KMail doesn't differentiate between unstructured and structured field bodies.
Comment 2 Erik Quaeghebeur 2008-05-18 23:35:37 UTC
Indeed it seems that KMail seems to ignore syntax when applying MIME encoded word decoding. The problem is explained/analyzed very well in the following usenet-post: <http://groups.google.com/group/comp.mail.pine/msg/f4f8bf9036326989>.
(Remarks about KMail at the very end.)
Comment 3 Fernando Vilas 2008-11-09 17:54:21 UTC
I copied the subject line given above, and sent myself an email using KMail 1.10.1.  The received copy of the email shows the decoded text.
Comment 4 Michael Leupold 2008-11-23 21:11:41 UTC
Still reproducible on trunk r887937.
Comment 5 Michael Leupold 2008-11-23 21:12:29 UTC
Created attachment 28778 [details]
Patch

This should fix it.
Comment 6 Chris Heath 2008-11-23 22:43:59 UTC
IMHO this patch is a good start, but I think adding an "unstructured" parameter to encodeRFC2047String() is going in the wrong direction.

Why? Structured headers should be escaped piece by piece, not as a whole string.  For example, consider this (unescaped) From: header:

From: Chris <<ク>> Heath <me@example.com>

The first 2 "<" must be escaped, but the third must not.  encodeRFC2047String() can't know that.  Fix the callers of encodeRFC2047String() instead.
Comment 7 Laurent Montel 2015-04-12 09:55:20 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.