Bug 324365 - Improve handling of encrypted attachments (gpg inline)
Summary: Improve handling of encrypted attachments (gpg inline)
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: 5.3.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 122099 141215 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-01 17:41 UTC by Axel Braun
Modified: 2017-11-18 18:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2013-09-01 17:41:27 UTC
Handling of encrypted attachements is currently a PITA!

Reproducible: Always

Steps to Reproduce:
1. receive an encrypted EMail with an encrypted attachment (anything.pdf.pgp)
2.
3.
Actual Results:  
KMail offers to open with kpgp
Doing so - nothing happens (kpgp starts, and I assume the file goes to some /tmp/kde-user/anything.pdf file)
start again, save attachment
go to directory where saved
click anything.pdf.pgp
the file is decrypted
click anything.pdf to view (finally)

Expected Results:  
KMail offers to open with kpgp
Doing so, ocular the default pdf viewer opens and shows the attachment
Comment 1 Laurent Montel 2013-09-01 19:24:34 UTC
I never had it. But will test it soon.

How do you encrypt attachment ? in kmail or in other program ?
Comment 2 Axel Braun 2013-09-01 19:42:33 UTC
I mostly get them from Thunderbird with enigmail
Comment 3 Laurent Montel 2013-09-01 21:12:31 UTC
ok thanks for info
Comment 4 Sandro Knauß 2013-10-19 21:23:30 UTC

*** This bug has been marked as a duplicate of bug 286481 ***
Comment 5 Sandro Knauß 2013-10-19 21:26:12 UTC
Sorry this bug is when using inline PGP encrypted messages.
#286481 is the problem with PGP MIME messages.
Comment 6 Sandro Knauß 2013-10-19 21:37:37 UTC
*** Bug 141215 has been marked as a duplicate of this bug. ***
Comment 7 Axel Braun 2013-12-03 07:56:36 UTC
Is #286481marked as solved? I see exactly the same problem in 4.11.2 final. I see an icon in the message part of the mail but I cant click it. From the header of the mail:

X-Enigmail-Version: 1.6
Content-Type: multipart/encrypted;
 protocol="application/pgp-encrypted";
 boundary="40Ir16qHe3Oj02WPMcAiM973ESLocWXCa"
X-Provags-ID: V02:K0:IVgv5KdT65RCuZpTekNqbEXoUPfWOpeRq2U15t3Ns6l
 vprIvimlHJSGSg/Zx0ZoNF2AuoJlB/J55Kir4LWJPJMZE8qEmk
 iOxUdYHxubuz/l+LyIDBlLiKgQCYc7egv/zth05clsr0H1u3Gv
 +wuK1ljLHBeclc4X1iQMLBpuogTF5XcuOEZQ5sOcT0pCyyuCzb
 WJ86CRxerhXxrsP09OOyjEytBcNmUBwcqUfih8ejvJulElRLtc
 CZXiOxIASr3ygwVW7j0Wb3WkEMWxh0fyHaW+/1oyavGxqb0GP6
 0onoccvwqyJL5QvNH21Ut/dqwr/UPN61jHotoilni3eOZ7pBGu
 RlQ353+HODeJw9i6YNO8HY8fMrxiXdwYcikyMSZPvcOV8ATt1O
 qnAWXWf6DwI8A==
Envelope-To: axel.braun.......

This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
--40Ir16qHe3Oj02WPMcAiM973ESLocWXCa
Content-Type: application/pgp-encrypted
Content-Description: PGP/MIME version identification

Version: 1

--40Ir16qHe3Oj02WPMcAiM973ESLocWXCa
Content-Type: application/octet-stream; name="encrypted.asc"
Content-Description: OpenPGP encrypted message
Content-Disposition: inline; filename="encrypted.asc"

-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
Comment 8 Sandro Knauß 2013-12-05 15:02:05 UTC
The behavour of handling inline encrypted messages with their attachment is still not fixed.

(In reply to comment #7)
> Is #286481marked as solved? I see exactly the same problem in 4.11.2 final.
> I see an icon in the message part of the mail but I cant click it. From the
> header of the mail:

Please if you want to comment #286481 than do it on the bug page of this bug and not here. As I told before #286481 is about handling PGP mime messages and NOT PGP inline. That's why I have deleted the duplication. Btw. #286481 is fixed in 4.11.3 and not 4.11.2.
Comment 9 Sandro Knauß 2014-03-30 23:03:42 UTC
*** Bug 122099 has been marked as a duplicate of this bug. ***
Comment 10 Denis Kurz 2016-09-24 18:15:35 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 11 Sandro Knauß 2016-09-26 11:53:01 UTC
It is still an issue with master.
Comment 12 Sandro Knauß 2017-11-18 18:09:52 UTC
Git commit f51fd99a0560879168346efd3fe369c38f6e7d7c by Sandro Knauß.
Committed on 17/11/2017 at 00:59.
Pushed by knauss into branch 'master'.

pgp encrypted message are mostly marked as application/octet-stream

Summary:
We can autodetect if, the content of an mimepart is pgp encrypted.
FIXED-IN: 17.12.0

Test Plan: make sure, that attatchment are still handled as attachments and not as "normal" text.

Reviewers: vkrause

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8554

A  +83   -0    mimetreeparser/autotests/data/hidden/openpgp-inline-encrypted-with-attachment.mbox.html
A  +83   -0    mimetreeparser/autotests/data/iconic/openpgp-inline-encrypted-with-attachment.mbox.html
A  +83   -0    mimetreeparser/autotests/data/inlined/openpgp-inline-encrypted-with-attachment.mbox.html
A  +57   -0    mimetreeparser/autotests/data/openpgp-inline-encrypted-with-attachment.mbox
A  +83   -0    mimetreeparser/autotests/data/openpgp-inline-encrypted-with-attachment.mbox.html
A  +8    -0    mimetreeparser/autotests/data/openpgp-inline-encrypted-with-attachment.mbox.tree
M  +20   -2    mimetreeparser/src/bodyformatter/encrypted.cpp
M  +1    -0    mimetreeparser/src/bodypartformatter.cpp

https://commits.kde.org/messagelib/f51fd99a0560879168346efd3fe369c38f6e7d7c
Comment 13 Sandro Knauß 2017-11-18 18:14:33 UTC
It will be fixed with KDE Applications 18.04. Not with the upcoming 17.12.