Bug 501794 - application/pkcs7-mime attachments are not detected
Summary: application/pkcs7-mime attachments are not detected
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 6.3.2
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-20 12:41 UTC by daniele-kde
Modified: 2025-03-20 12:41 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 daniele-kde 2025-03-20 12:41:21 UTC
SUMMARY
I'm experiencing an issue with an email with an attachment with Content-Type: application/pkcs7-mime;. Kmail is NOT showing any attachment to this message, but is showing the textual content followed by "this message is encoded. ("Questo messaggio è cifrato." in my localization) and a link to decode it. 

This is the link as it appears in message view -> view source -> HTML source:
```
<a href="kmail:decryptMessage" style="display: inline-flex; align-items: center;"> <img src="file:qrc:/icons/breeze/actions/16/document-decrypt.svg" height="48" width="48"> Decifra il messaggio </a>
```

Once I click the link the signature is checked and its status is shown, but the underlying file is not shown and even right-clicking in the message window and choosing to save attachments does not work (popup is shown that there is no attachment)

The full headers of the part are:
```
Content-Type: application/pkcs7-mime;
	name="somedocument.docx.p7m"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="somedocument.docx.p7m"
```
I saved the message to disk and extracted the attachment with munpack without issues.

STEPS TO REPRODUCE
1. Open an email with an attachment with mime type "application/pkcs7-mime"
2. Click the link "kmail:decryptMessage"

OBSERVED RESULT
The signature of the attachment is checked. No attachment is shown or detected.

EXPECTED RESULT
The attachment can be opened / exported / saved to disk.

SOFTWARE/OS VERSIONS
```
$ kinfo
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.16-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon  780M Graphics
Memory: 30.7 GiB of RAM
Graphics Processor: AMD Radeon 780M
```

ADDITIONAL INFORMATION