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 314333 - Reply to an inline-PGP encrypted email does not decrypt orig email in body
Reply to an inline-PGP encrypted email does not decrypt orig email in body
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.4.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Milan Crha
Evolution QA team
evolution[composer] evolution[gpg]
: 326565 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-24 02:45 UTC by Carmine F. Greco
Modified: 2009-10-15 12:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
proposed evo patch (10.92 KB, patch)
2009-02-04 15:52 UTC, Milan Crha
none Details | Review
proposed evo patch ][ (12.04 KB, patch)
2009-02-04 19:28 UTC, Milan Crha
committed Details | Review

Description Carmine F. Greco 2005-08-24 02:45:13 UTC
Please describe the problem:
When replying to an inline-PGP encrypted email, the original email that is
included in the body of the reply is encrypted.  No recipient of the reply will
be able to decrypt that portion of the body, making it useless.

Steps to reproduce:
1. Receive an inline-PGP encrypted email
2. Hit Reply or Reply-All
3. 

Actual results:
Original email is embedded in the reply body as encrypted text


Expected results:
Original email is embedded in the reply body as decrypted text.  The decrypted
text could be re-encrypted when the reply is sent if the user chooses to encrypt
the reply.

Does this happen every time?
Yes

Other information:
Comment 1 André Klapper 2005-08-24 15:15:27 UTC
confirming, also saw this yesterday. hmm.
i also commented this on bug 217540, which was the bug for inline-pgp support.
Comment 2 Matt Brown 2005-08-24 21:05:41 UTC
Just to confirm, you are definitely seeing this in a version of evolution that
contains inline PGP support? ie > 2.3.8 I believe.

If so then I'll take a look at this.
Comment 3 Not Zed 2005-08-25 05:21:20 UTC
this might be fixed just after 2.3.8, i moved the inline pgp handling stuff from
em-format-html, which replying doesn't use, to em-format, which is used by
em-format-quote, which replying does use.  if that makes sense.

an easy workaround: select the text you want to reply to, and hit reply, it will
use the displayed text directly.

Comment 4 André Klapper 2005-08-31 10:04:15 UTC
the workaround of course works, but it isn't fixed in
evolution-2.4.0.0.200508300318-0.snap.novell.11.1

will check this in a few days again
Comment 5 André Klapper 2005-09-15 14:40:27 UTC
this is not fixed in evolution-2.4.0.0.200509090712-0.snap.novell.11.1, so reopening
Comment 6 André Klapper 2006-02-02 14:47:55 UTC
*** Bug 326565 has been marked as a duplicate of this bug. ***
Comment 7 André Klapper 2006-05-31 10:20:05 UTC
*** Bug 343478 has been marked as a duplicate of this bug. ***
Comment 8 postmodern 2006-05-31 20:13:09 UTC
I submitted a feature request relating to Evolution+GnuPG but got linked to this similar bug. I propose that the original message that is being replied too be decrypted, embedded into the new email and the new email encrypted by default, thus keeping the original message and the reply secure. This could be hard-coded in or made an option for the user. It would prevent users from accidentally sending an unencrypted reply to an encrypted email, exposing the original message.
Comment 9 André Klapper 2006-05-31 20:54:25 UTC
postmodern: sorry, i obviously marked the wrong bug as original.
Comment 10 Paul Wise 2008-05-07 06:40:29 UTC
Still an issue in Debian evolution 2.22.1.1-1. IMO replying to an encrypted email with an unencrypted one is a bug rather than a feature. This happens with both inline-gpg and normal gpg.

Debian bug is here:

http://bugs.debian.org/335573
Comment 11 Milan Crha 2009-02-04 15:52:38 UTC
Created attachment 127930 [details] [review]
proposed evo patch

for evolution;

This is for the issue of not setting composer's security options.

With respect to the inline signatures/encryptions, I checked that and it works fine when the encrypted part has set right Content-Type, which is supposed to be
application/x-inlinepgp-encrypted, respectively
application/x-inlinepgp-signed
In case of the inlined encrypted message being just part of some text/plain part, it's treated as that. Can you check with your message source, what is the reason? (My version is actual trunk, thus 2.25.90.)
Comment 12 Matthew Barnes 2009-02-04 16:01:50 UTC
Question about your patch:

+static void
+emu_update_composers_security (EMsgComposer *composer, guint32 validity_found)
+{
+	GtkToggleAction *action;
+
+	g_return_if_fail (composer != NULL);
+
+	if (validity_found & EM_FORMAT_VALIDITY_FOUND_SIGNED) {
+		action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_SIGN (composer));
+		gtk_toggle_action_set_active (action, TRUE);
+	}
+
+	if (validity_found & EM_FORMAT_VALIDITY_FOUND_ENCRYPTED) {
+		action = GTK_TOGGLE_ACTION (E_COMPOSER_ACTION_PGP_ENCRYPT (composer));
+		gtk_toggle_action_set_active (action, TRUE);
+	}
+}
+

...

+static void
+add_validity_found (EMFormat *emf, CamelCipherValidity *valid)
+{
+	g_return_if_fail (emf != NULL);
+
+	if (!valid)
+		return;
+
+	if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)
+		emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SIGNED;
+
+	if (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE)
+		emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_ENCRYPTED;
+}
+

Do the CAMEL_CIPHER_VALIDITY flags imply PGP encryption?  What if the message uses S/MIME encryption?  Will replying to an S/MIME encrypted message set PGP encryption rather than S/MIME encryption in the reply?
Comment 13 Milan Crha 2009-02-04 16:17:21 UTC
It doesn't indicate type of the found signature/encryption. It always uses GPG. Same as composer itself.
Comment 14 Matthew Barnes 2009-02-04 16:31:06 UTC
Well, the composer can use either GPG or S/MIME.  There's items for both under the Security menu.
Comment 15 Milan Crha 2009-02-04 16:38:39 UTC
Yup, but it isn't. e-msg-composer.c:handle_multipart_signed:
/* FIXME: make sure this isn't an s/mime signed part?? */
and similar in handle_multipart_encrypted :)
Comment 16 Milan Crha 2009-02-04 19:28:15 UTC
Created attachment 127940 [details] [review]
proposed evo patch ][

for evolution;

pretty simple, actually :)
Comment 17 Srinivasa Ragavan 2009-02-12 09:02:28 UTC
I assume Matt is reviewing it.
Comment 18 Milan Crha 2009-04-22 09:40:07 UTC
Hi srag, I assume Matt is busy enough with kill-bonobo. What about reclassify?
Comment 19 Akhil Laddha 2009-09-10 03:46:03 UTC
Matt, would you be able to review patch now ?
Comment 20 Milan Crha 2009-10-15 12:27:22 UTC
Created commit 13651b3 in evo master (2.29.1+)

I chose to commit to master only, as this is no a critical issue (based on number of duplicates).