Summary: | Importing an OpenPGP key attached to an encrypted message doesn't work | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Ingo Klöcker <kloecker> |
Component: | crypto | Assignee: | Ingo Klöcker <kloecker> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 5.23.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/pim/messagelib/commit/b6e4d5323f8b9af11e72ec3fb32946ff0036188e | Version Fixed In: | 5.23.1 |
Sentry Crash Report: |
Description
Ingo Klöcker
2023-05-05 08:40:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/messagelib/-/merge_requests/120 Git commit eb0f9afecdd29387f2c65c07e8c20445226e17a9 by Ingo Klöcker, on behalf of Ingo Klöcker. Committed on 05/05/2023 at 14:41. Pushed by kloecker into branch 'master'. Do not report success if no keys where considered for import M +2 -0 plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeyurlhandler.cpp https://invent.kde.org/pim/kdepim-addons/commit/eb0f9afecdd29387f2c65c07e8c20445226e17a9 Git commit 925db3260235192df76d6585e6e01ee9973ed1cf by Ingo Klöcker, on behalf of Ingo Klöcker. Committed on 05/05/2023 at 14:30. Pushed by kloecker into branch 'release/23.04'. 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. FIXED-IN: 5.23.1 M +1 -1 mimetreeparser/src/messagepart.cpp M +5 -0 mimetreeparser/src/nodehelper.cpp M +3 -0 mimetreeparser/src/nodehelper.h https://invent.kde.org/pim/messagelib/commit/925db3260235192df76d6585e6e01ee9973ed1cf Git commit b6e4d5323f8b9af11e72ec3fb32946ff0036188e by Ingo Klöcker, on behalf of Ingo Klöcker. Committed on 05/05/2023 at 14:43. Pushed by kloecker into branch 'master'. 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. FIXED-IN: 5.23.1 (cherry picked from commit 925db3260235192df76d6585e6e01ee9973ed1cf) M +1 -1 mimetreeparser/src/messagepart.cpp M +5 -0 mimetreeparser/src/nodehelper.cpp M +3 -0 mimetreeparser/src/nodehelper.h https://invent.kde.org/pim/messagelib/commit/b6e4d5323f8b9af11e72ec3fb32946ff0036188e |