Bug 340602 - KMail puts PGP/MIME signed attachments twice into the same mail (doubling mailsize)
Summary: KMail puts PGP/MIME signed attachments twice into the same mail (doubling mai...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: 4.14.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 13:24 UTC by kolAflash
Modified: 2016-09-25 22:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.3


Attachments
test mail (mbox file) (5.70 KB, application/mbox)
2015-06-22 10:53 UTC, Hauke Laging
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kolAflash 2014-11-03 13:24:57 UTC
When sending an PGP/MIME signed (and optionally also encrypted) mail, including signed attachments, KMail puts every attachment twice into the mail.

This double's the size of the mail!

Example mail body, created by KMail. You'll see, that the (very small) file "blue-pixel.png" has become attached twice. But I attached it only once to the mail.
========================================
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1782944.DN5yU133gh"; micalg="pgp-sha1"; protocol="application/pgp-signature"
User-Agent: KMail


--nextPart1782944.DN5yU133gh
Content-Type: multipart/mixed; boundary="nextPart4748887.diooyAto5j"
Content-Transfer-Encoding: quoted-printable

This is a multi-part message in MIME format.

=2D-nextPart4748887.diooyAto5j
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Small test mail.
=2D-nextPart4748887.diooyAto5j
Content-Disposition: attachment; filename="blue-pixel.png"
Content-Transfer-Encoding: base64
Content-Type: image/png; name="blue-pixel.png"

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH3gsDDREaJ+YAOQAAAB1pVFh0Q29tbWVudAAAAAAAQ3Jl
YXRlZCB3aXRoIEdJTVBkLmUHAAAADUlEQVQI12NgyDj2HwADyAIu6/Hk0wAAAABJRU5ErkJggg==

=2D-nextPart4748887.diooyAto5j--
This is a multi-part message in MIME format.

--nextPart4748887.diooyAto5j
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Small test mail.
--nextPart4748887.diooyAto5j
Content-Disposition: attachment; filename="blue-pixel.png"
Content-Transfer-Encoding: base64
Content-Type: image/png; name="blue-pixel.png"

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH3gsDDREaJ+YAOQAAAB1pVFh0Q29tbWVudAAAAAAAQ3Jl
YXRlZCB3aXRoIEdJTVBkLmUHAAAADUlEQVQI12NgyDj2HwADyAIu6/Hk0wAAAABJRU5ErkJggg==

--nextPart4748887.diooyAto5j--

--nextPart1782944.DN5yU133gh
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

...%signature data%...
-----END PGP SIGNATURE-----

--nextPart1782944.DN5yU133gh--
========================================

Reproducible: Always
Comment 1 kolAflash 2014-11-04 15:39:43 UTC
First test was with KDE 4.11.5 (openSUSE 13.1 with latest distribution updates)

Now repeated the test with KDE 4.14.2 (openSUSE 13.2)

Same bug in both versions!
Comment 2 kolAflash 2014-12-01 10:16:41 UTC
Still there in 4.14.3
Comment 3 Hauke Laging 2015-06-22 10:53:10 UTC
Created attachment 93289 [details]
test mail (mbox file)

This is a very small email for demonstration purposes. The attachments are two one-line plain/text files.
Comment 4 Hauke Laging 2015-06-22 10:54:20 UTC
I confirm this for 4.14.8

But not only are the attachments added twice to the mail but the mail body, too. Of course, due to the typical size relation this is not obvious.
Comment 5 kolAflash 2015-06-22 13:30:40 UTC
Confirming what Hauke reported.

Mail body is also added twice and bug still exists in 4.14.8.
Comment 6 Palko 2015-10-06 12:18:24 UTC
I confirm this bug (using 4.13.3) for big attachments this is a real problem
Comment 7 Tristan Miller 2016-08-12 18:44:02 UTC
Confirming this severe bug still exists in KMail 4.14.10.
Comment 8 kolAflash 2016-09-03 17:15:55 UTC
Looks like this got fixed in KMail 5.1.3 but the fix wasn't backported to 4.x.

At least for me the bug is gone since updating to KMail 5.1.3 and it returns when downgrading to 4.14.10.
(all software used from openSUSE 42.1)

Can someone confirm? If yes, feel free to set status "RESOLVED".