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 615400 - evolution fails to decode rfc2047 headers provided in mailto: URLs
evolution fails to decode rfc2047 headers provided in mailto: URLs
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
2.28.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[composer]
Depends on:
Blocks:
 
 
Reported: 2010-04-10 21:53 UTC by noel
Modified: 2021-05-19 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test code (1.68 KB, text/x-python)
2013-01-03 15:43 UTC, Vadim Rutkovsky
Details

Description noel 2010-04-10 21:53:47 UTC
Hello,

a forwarded bug report from http://bugs.debian.org/324820

--8<--
From: Marc Lehmann <debian-reportbug@plan9.de>

When I start evolution with a mailto url (as might happen when it is
started by a program sucha s mozilla when clicking on mailto urls),
evolution fails to decode the url correctly and also fails to _encode_ the
header on send.

Example:

evolution "mailto:chicia@sathoid.com?Subject=%3D%3Fiso-8859-1%3Fq%3FTest%3D20%3DFC%3DF6%3DE4%3D20hal%3F%3D%0D%0A%09%3D%3Fiso-8859-1%3Fq%3Fl%3DF6chen%3D3F%3D20oi%3D20yes%3D3F%3D20[Ticket%3D20103]%3F%3D"

This is simply a mailto: url for chicia@sathoid.com with a subject of 
"Test üöä hallöchen? oi yes?"

Then evolution fails to decode the Subject header, and presents me with a
subject of (verbatim):

=?iso-8859-1?q?Test=20=FC=F6=E4=20hal?=
   	=?iso-8859-1?q?l=F6chen=3F=20oi=20yes=3F=20[Ticket=20103]?=

The two components are separated by \015\012\011, CRLF-Tab. The tab
is displayed as a space, while CRLF are displayed as boxed "0D" "0A"
characters (i.e. verbatim CRLF as displayed by pango).

When sending the mail, evolution fails to _encode_ the header
correctly. The mail looks like this:

Mime-Version: 1.0
Subject: =?iso-8859-1?q?Test=20=FC=F6=E4=20hal?=
	=?iso-8859-1?q?l=F6chen=3F=20oi=20yes=3F=20[Ticket=20103]?=

That is, the subject line is copied verbatim into the RFC message,
including the control characters.  Unfortunately, as the header happens to
be a valid mime header, any receiving program will correctly decode the
message header and end up with "Test üöä hallöchen? oi yes?", which is
not the content of the Subject field upon sending the mail.

So evolution fails to correctly "escape" at least the subject mail header
when sending mime mails.

I've got to say that this is the firts case of two mostly unrelated bugs
that cancel each other out, except for a display problem :)
Comment 1 Vadim Rutkovsky 2013-01-03 15:43:32 UTC
Created attachment 232647 [details]
Test code

Confirmed in evo 3.7.3 and 3.6.2.

See attached test code to reproduce. 
Different contact names are decoded using python RFC 2047 implementation and compared to expected result. Address is corrupted when any unicode value is passed.

The faulty module is camel-internet-address.c
Comment 2 Vadim Rutkovsky 2013-01-03 16:45:05 UTC
Comment on attachment 232647 [details]
Test code

Sorry, I've commented the wrong bug, so disregard the comment
Comment 3 jasen 2018-01-21 21:53:19 UTC
RFC2047 is an email encoding not a URI encoding, just encode the subject for URI

evolution "mailto:chicia@sathoid.com?Subject=Test%20%C3%BC%C3%B6%C3%A4%20hall%C3%B6chen%3F%20oi%20yes%3F"
Comment 4 André Klapper 2021-05-19 12:29:01 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. 
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines
and create a new bug report ticket at
  https://gitlab.gnome.org/GNOME/evolution/-/issues/

Thank you for your understanding and your help.