Bug 434054 - Importing a pgp key from an encrypted mail is broken
Summary: Importing a pgp key from an encrypted mail is broken
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-06 13:29 UTC by iiwzm48z8awq
Modified: 2021-03-06 13:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iiwzm48z8awq 2021-03-06 13:29:51 UTC
SUMMARY

When trying to import a pgp key from a pgp encrypted mail, via the "Import key" button, nothing happens.

STEPS TO REPRODUCE
1. Send yourself a key, via an pgp encrypted mail.
2. Try to import it.

OBSERVED RESULT

The UI does nothing. The logs show
```
org.kde.pim.kmail: Can't handle URL: QUrl("x-kmail:/bodypart/1/1.2/pgpkey?action=import")
```

EXPECTED RESULT

The key is imported, as happens with a non encrypted mail.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
KMail Version: 5.16.3 (Arch package 20.12.3-1)
Qt Version: 5.15.2
Kernel Version: 5.11.2-arch1-1
OS Type: 64-bit
Graphics Platform: X11


ADDITIONAL INFORMATION

The email header looks like this
```
Content-Type: multipart/encrypted;
 protocol="application/pgp-encrypted";
 boundary="Qf2pZc3rLGxyWnUjkE8SJ4HUsaml46L0O"
[..]

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

Version: 1

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

In a past version (i don't know the version number unfortunately), it was possible to work around the issue, via the "Copy Decrypted To.." functionality. That is now broken, as well, showing a mail like (without attachment)

```
--w1SKpr0Xjo6XiZYwgRcUxFIfcbZnkGMSt
Content-Type: multipart/mixed; boundary="------------BCD952FEE72696A4A7BB51A9"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------BCD952FEE72696A4A7BB51A9
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: quoted-printable

[...]

--------------BCD952FEE72696A4A7BB51A9
Content-Type: application/pgp-keys; name="0x4F4885D024xxxxxx.asc"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="0x4F4885D024xxxxxx.asc"

--------------BCD952FEE72696A4A7BB51A9--

--w1SKpr0Xjo6XiZYwgRcUxFIfcbZnkGMSt--
```