Skip to content

Fix references to message parts in encrypted messages

For a content node in the decrypted mime tree of an encrypted message content()->index() gives a wrong "relative" index inside the decrypted mime tree. NodeHelper::fromHREF() which is used to get the content node for the reference has no idea that is need to look inside the decrypted message and returns the content node of the encrypted message corresponding to the reference which is most likely the encrypted message part. As a result importing an OpenPGP key or a vCard attached to an encrypted message failed because the wrong message part was passed to the corresponding URL handlers. Using (a simpler overload of) NodeHelper::asHREF() (i.e. the counter part for NodeHelper::fromHREF()) for generating the reference fixes those problems.

I have verified that this change is safe for all users of MessagePart::makeLink (which all live in kdepim-addons) and I have tested that it fixes importing OpenPGP keys and vCards attached to encrypted messages.

BUG: 469383 FIXED-IN: 5.23.1

Merge request reports

Loading