Bug 429050 - REGRESSION: Decryption of multi-part encrypted messages by means of "Decrypt" FILTER scrambles message structure
Summary: REGRESSION: Decryption of multi-part encrypted messages by means of "Decrypt"...
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.15.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-13 09:29 UTC by whatifgodwasoneofus
Modified: 2021-10-07 12:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Decrypt filter bug example screenshot (110.90 KB, image/png)
2020-11-13 09:29 UTC, whatifgodwasoneofus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description whatifgodwasoneofus 2020-11-13 09:29:18 UTC
Created attachment 133290 [details]
Decrypt filter bug example screenshot

SUMMARY
When I open an encrypted multi-part message (even if no HTML is present at all), everything goes well as long as I keep the message *stored encrypted*.
In the moment I use a filter with a “Decrypt” action, then the decrypted message is visualised as message source (with some headers), and not displayed correctly anymore. In case of messages coded in base64, I get the whole base64 source...

STEPS TO REPRODUCE
1. Create a filter that uses "DECRYPT" as action (Settings/Configure Filters)
2. Send yourself an encrypted message via GPG
3. In the inbox, open the encrypted message: you'll see it correctly composed in the message window
4. Close the message window
5. In the inbox, right-click on the encrypted message and select "Apply Filter", then choose the filter you created at point (1)
6. The message appears like you're looking at its raw format

OBSERVED RESULT
See attachment.

EXPECTED RESULT
The DECRYPT action in the filter shall decrypt the message correctly, like it happens when you open the encrypted message manually.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro/ 20.08.3 (bug is there at least since 20.08.2)
KDE Plasma Version: 20.08.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1 (built against 5.15.1)

ADDITIONAL INFORMATION
The "Decrypt" action in the filter has worked perfectly for me until kmail 5.15.2. I used this action in my filter to automatically decrypt incoming messages, so that they are stored unencrypted in my mailbox folders and the Search works on their content.
With this bug there is not way anymore to store the message unencrypted in a usable format.
Comment 1 whatifgodwasoneofus 2020-11-22 14:37:04 UTC
I have found a dirty old-times workaround.
I am using another filter type, "Pipe Through", to pipe the message to the stdin of a script that uses python-gpgme to decrypt the message to stdout.

I am very sorry that this regression was not even triaged.
It is disheartening to see KMail looking day after day like abandonware.

I wouldn't be surprised to see this bug marked as "RESOLVED", since I have found a workaround, although it clearly is an unresolved regression.
And it would also not surprise me to read comments like "if you don't like it anymore, then use another alternative" or even "if you're better than us, then patch it yourself".
But the most expected comment, honestly, is "the average new user does not need this feature" (a security feature, btw).

And who knows if this comment survives more than one day before being removed as "provocative rant"...
Comment 2 0xc0ffee 2021-01-05 16:30:39 UTC
I can confirm that I'm experiencing the same issue as reported in both plaintext _and_ multi-part (e.g. HTML) decrypted messages.

SOFTWARE/OS VERSIONS
Linux:  Gentoo Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
KDE Apps Version: 20.08.3
Qt Version: 5.15.1

I also experience a regression issue with the Encrypt filter which screws up again both plaintext _and_ multi-part messages when encrypted. Subsequent decryption in other mail clients (e.g. Thunderbird) raises a "Partially Encrypted" warning followed by the same garbled decrypted result as reported above. This may merit a separate bug report but the issues may be related, hence why I thought it worth mentioning.

It's a shame indeed since KMail has so far been one of the very few mail clients with good and working PGP encryption/decryption and the only one with solid filtering based on PGP.

Hopefully this can be addressed soon.
Comment 3 David C. Bryant 2021-06-20 16:32:19 UTC
I also verified that this is a bug. And it doesn't have to be a filter that decrypts the message. I used "Message --> Copy Decrypted to --> Recent Folders". The copied (and decryptd) message had the same problem ... the message structure has been gaarbled, somehow.
Comment 4 0xc0ffee 2021-10-07 12:32:43 UTC
Almost a year later and no comment from maintainers.

I absolutely love KMail and how feature rich it is, but this is why I no longer use it and do not plan on doing so any time soon as the QA seems very poor. Ironically, I have yet to see an email client that is compatible in terms of features.