Bug 487029 - kmail uses media type literal packet in OpenPGP
Summary: kmail uses media type literal packet in OpenPGP
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: 6.0.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-14 20:27 UTC by Pony Hütchen
Modified: 2024-05-23 13:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pony Hütchen 2024-05-14 20:27:56 UTC
SUMMARY
When encrypting messages in OpenPGP/MIME format, kmail uses the format tag 'm' in the literal data packet inside the OpenPGP Message, while in RFC 4880, only are 'b', 't' and 'u' are defined. Because of that, some MUAs do not display the decrypted message.
kmail changed from using 'b' to using 'm' between 5.24.5 and 6.0.2. 

STEPS TO REPRODUCE
1. Compose an encrypted message.
2. Export the message, save it into an imap folder, or send it to another mailbox.
3. Try to view the message in Mozilla Thunderbird.

OBSERVED RESULT
Thunderbird shows obscure error message.

EXPECTED RESULT
The message should be displayable by Thunderbird (and other MUAs).

ADDITIONAL INFORMATION
Relevant section in RFC 4880: https://datatracker.ietf.org/doc/html/rfc4880#section-5.9
Draft for the 'm' format tag: https://www.ietf.org/archive/id/draft-moscaritolo-openpgp-literal-01.html
You can use `gpg --list-packets` to find out which format tag was used in an OpenPGP Message.
Comment 1 Pony Hütchen 2024-05-20 17:01:00 UTC
The bug was introduced in this commit: https://invent.kde.org/pim/messagelib/-/commit/df004260
I haven't tested, but I think reverting df004260 and d72f0c76 should fix it.
Comment 2 Bug Janitor Service 2024-05-23 12:11:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/messagelib/-/merge_requests/202
Comment 3 Pony Hütchen 2024-05-23 13:19:35 UTC
Git commit 472accbcdf3d478a6e444d9f4e8a6e64d6845ebb by Pony Hütchen.
Committed on 23/05/2024 at 09:11.
Pushed by carlschwan into branch 'master'.

Revert "Mark encrypted part as mime"

Marking OpenPGP Literal Data packet as mime is not defined in RFC 4880.
Not all OpenPGP implementations support it.

This reverts commit d72f0c76a561b4968cba56ae850dd955073fac6d.
This reverts commit df004260035c55dafd16d186fef479d48e877bf3.

M  +0    -6    CMakeLists.txt
D  +0    -6    config-messagelib.h.in
M  +0    -7    messagecomposer/src/job/encryptjob.cpp

https://invent.kde.org/pim/messagelib/-/commit/472accbcdf3d478a6e444d9f4e8a6e64d6845ebb
Comment 4 Carl Schwan 2024-05-23 13:20:11 UTC
Git commit 4582efa45cb5614e50356829474c85cfd37f07d7 by Carl Schwan, on behalf of Pony Hütchen.
Committed on 23/05/2024 at 13:20.
Pushed by carlschwan into branch 'release/24.05'.

Revert "Mark encrypted part as mime"

Marking OpenPGP Literal Data packet as mime is not defined in RFC 4880.
Not all OpenPGP implementations support it.

This reverts commit d72f0c76a561b4968cba56ae850dd955073fac6d.
This reverts commit df004260035c55dafd16d186fef479d48e877bf3.


(cherry picked from commit 472accbcdf3d478a6e444d9f4e8a6e64d6845ebb)

M  +0    -6    CMakeLists.txt
D  +0    -6    config-messagelib.h.in
M  +0    -7    messagecomposer/src/job/encryptjob.cpp

https://invent.kde.org/pim/messagelib/-/commit/4582efa45cb5614e50356829474c85cfd37f07d7