Bug 93916 - OpenPGP/MIME signing fails with drag-and-drop 8-bit attachments (in any encoding)
Summary: OpenPGP/MIME signing fails with drag-and-drop 8-bit attachments (in any encod...
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: encryption (show other bugs)
Version: 1.5.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2004-11-25 19:28 UTC by Tristan Miller
Modified: 2008-09-16 20:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
An iso-8859-1-encoded e-mail message (to be attached to other messages) (2.63 KB, text/plain)
2004-11-25 19:30 UTC, Tristan Miller
Details
E-mail with a correctly signed file attachment (4.72 KB, text/plain)
2004-11-25 19:32 UTC, Tristan Miller
Details
E-mail with incorrect drag-and-drop 8-bit attachment (4.61 KB, text/plain)
2004-11-25 19:33 UTC, Tristan Miller
Details
E-mail with incorrect drag-and-drop quoted-printable attachment (4.59 KB, text/plain)
2004-11-25 19:34 UTC, Tristan Miller
Details
E-mail with incorrect drag-and-drop Base64 attachment (5.39 KB, text/plain)
2004-11-25 19:35 UTC, Tristan Miller
Details
Screenshot showing Attachment 8434 being viewed in KMail (188.96 KB, image/png)
2004-11-25 19:37 UTC, Tristan Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2004-11-25 19:28:52 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    SuSE RPMs

It is impossible to attach a message to another message via drag-and-drop and have that attachment signed via PGP/GnuPG.  The resulting message always has a bad signature.  This happens whether the encoding selected is 8-bit, Base64, or quoted-printable.

Steps to reproduce:

0) Set up KMail to work with GnuPG.
1) Message->New Message
2) Fill in header fields as required
3) From the main KMail window, drag a message containing 8-bit characters to the compose window.  It now shows up as an attachment in a subpane.
4) If desired, right-click on the attachment, select Properties, and select either 8-bit, Base64, or Quoted-printable as the encoding.
5) Make sure the message and attachment are to be cryptographically signed (Options->Sign Message) and formatted via OpenPGP/MIME (Options>Cryptographic Message Format->OpenPGP/Mime) using a valid key
6) Message->Send Now
7) View the message you just sent in your sent-mail folder.  Even though you signed it with your own key, KMail claims the signature is bad. (See screenshot attachment.)

There is either some interoperability issues with GnuPG, or KMail is modifying the message after it is signed, or both.

This problem occurs only with drag-and-drop attachments.  If I save an e-mail message to a file and then attach it via Attach->Attach File, then the PGP signature is valid.

I am attaching a sample e-mail message, plus several signed e-mails attaching this message.
Comment 1 Tristan Miller 2004-11-25 19:30:02 UTC
Created attachment 8430 [details]
An iso-8859-1-encoded e-mail message (to be attached to other messages)
Comment 2 Tristan Miller 2004-11-25 19:32:05 UTC
Created attachment 8431 [details]
E-mail with a correctly signed file attachment

This e-mail contains Attachment 8430 [details] as a signed attachment.  It was produced
via Attach->Attach File.  The signature is valid.
Comment 3 Tristan Miller 2004-11-25 19:33:55 UTC
Created attachment 8432 [details]
E-mail with incorrect drag-and-drop 8-bit attachment

This is an e-mail message containing Attachment 8430 [details] as an unencoded 8-bit
attachment.  This attachment was produced via drag-and-drop.  The signature is
invalid.
Comment 4 Tristan Miller 2004-11-25 19:34:54 UTC
Created attachment 8433 [details]
E-mail with incorrect drag-and-drop quoted-printable attachment

This is an e-mail message containing Attachment 8430 [details] as a quoted-printable
attachment.  This attachment was produced via drag-and-drop.  The signature is
invalid.
Comment 5 Tristan Miller 2004-11-25 19:35:33 UTC
Created attachment 8434 [details]
E-mail with incorrect drag-and-drop Base64 attachment

This is an e-mail message containing Attachment 8430 [details] as a base64-encoded
attachment.  This attachment was produced via drag-and-drop.  The signature is
invalid.
Comment 6 Tristan Miller 2004-11-25 19:37:31 UTC
Created attachment 8435 [details]
Screenshot showing Attachment 8434 [details] being viewed in KMail
Comment 7 Tristan Miller 2004-11-25 19:42:52 UTC
I should also point out that the attachment as displayed by KMail in Attachment 8434 [details] seems to be mangled... the fancy From/To/Subject box contains no header information.  There is a similar problem with 8-bit and quoted-printable drag-and-drop attachments.  Let me know if you want a screenshot of those too.
Comment 8 Tristan Miller 2005-04-30 21:51:51 UTC
Confirming bug still exists in KDE 3.4.
Comment 9 Dominik Tritscher 2008-09-14 17:50:08 UTC
This seems to work with KDE4 using kmail from trunk r860647.
Comment 10 Jaime Torres 2008-09-16 20:02:56 UTC
it works for me also in trunk.