After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 108557 - Encoded-word are not decoded when contain '.', ':', ...
Encoded-word are not decoded when contain '.', ':', ...
Status: RESOLVED FIXED
Product: gmime
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jeffrey Stedfast
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-03-16 23:11 UTC by Patrick Lamaiziere
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patrick Lamaiziere 2003-03-16 23:11:38 UTC
Pan 0.13.91.

When an encoded-word (RFC 2047) contains characters like '.', ':' or ','
(may be others) it is not decoded.

Sample: Subject: 8bits et =?iso-8859-1?Q?=E9=E9=E9:=E0=E0=E0?=

(Some Newsreaders like OE encode the Re: in the subject)
Comment 1 Christophe Lambin 2003-03-24 15:38:08 UTC
Reassigning to fejj, gmime's author.

Fejj: this is a duplicate of bug #102361.  Haven't closed so you can
decide whether you want to support invalid RFC2047 encodings or not.
Comment 2 Patrick Lamaiziere 2003-03-24 20:51:26 UTC
It is not all the time invalid. It depends of the context. For
unstructured text field like Subject, the RFC2047 allows these
characters into an encoded-word :

Subject: =?iso-8859-1?Q?=E9=E9=E9:=E0=E0=E0?=
Subject: =?us-ascii?Q?"Patrick"?=
are *valid* RFC2047 encoding.

But, for example:
From: =?us-ascii?Q?"Patrick"?= is not valid.

----

RFC2047 :
2 - Syntax
[...]
encoded-text = 1*<Any printable ASCII character other than "?"
                     or SPACE>
                  ; (but see "Use of encoded-words in message
                  ; headers", section 5)

4 - encoding
[...]
For example, an 'encoded-word' in a 'phrase' preceding an address in a
From header field may not contain any of the "specials" defined in RFC
822. Finally, certain other characters are disallowed in some
contexts, to ensure reliability for messages that pass through
internetwork mail gateways. 

The "B" encoding automatically meets these requirements.  The "Q"
encoding allows a wide range of printable characters to be used in
non-critical locations in the message header (e.g., Subject), with
fewer characters available for use in other locations.

----
[Sorry for the duplicate report]
Comment 3 Jeffrey Stedfast 2003-03-24 21:03:17 UTC
they are never valid. you are just mis-interpreting the rfc (it's easy
to do...)

rfc2047 encoded-word tokens MUST be parsable ALWAYS as rfc822 atoms.
if you go look up the definition for an rfc822 atom, you find that an
atom disallows :'s etc
Comment 4 Jeffrey Stedfast 2003-03-31 04:36:55 UTC
g_mime_utils_header_decode_text() replaces g_mime_8bit_header_decode()
in gmime-2.1.x development series (aka cvs trunk) and now allows for
this. it is much less strict than the old code.

still does not accept stuff like:

=?charset?q?foo?=, bar

ie, gmime still wants a lwsp around encoded-word's. might eventually
try working around that too tho. besides, I think that is in another
similar bug report.