Bug 368694 - mailto url body lost for unknown reasons
Summary: mailto url body lost for unknown reasons
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 5.5.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 13:34 UTC by Harald Sitter
Modified: 2017-05-19 07:48 UTC (History)
1 user (show)

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 Harald Sitter 2016-09-12 13:34:14 UTC
kgpg can sign and send a key by mail. it does so via qdesktopservices::openurl to which it passes an url of the form 

mailto:sitter@kde.org?subject=Your%20key%20asfadfafadsf&body=-----BEGIN%20PGP%20MESSAGE-----%0AVer

The body part of this url is subsequently lost in kmail for unkown reasons and doens't display in the editor window at all. Subject works as expected.

this doesn't work:
kmail 'mailto:groot@kde.org?subject=Your%20key%207FEA3DA6169C77D6&body=-----BEGIN%20PGP%20'

this works:
kmail 'mailto:groot@kde.org?subject=Your%20key%207FEA3DA6169C77D6&body=-----BEGIN%20PGP'

Parsing in kmkernel works correctly, it passes the string as expected to ::action to ::openComposer  where the body is still correct before it is put in a KMime::Message and handed to KMail::makeComposer which in turn goes to KMComposerWin::KMComposerWin where it goes into MessageComposer::ComposerViewBase::setMessage. Unfortunately I couldn't build all the necessary stuff, so that's where I gave up.

Working theory is that the composer eats the body for unknown reasons. It can't be decryption problems though since from what I can tell in all my tests the relevant bool argument was false. Nevertheless it could be that invalid pgp messages get rejected (if so it should still put a warning or something in the body).

If so, it's conceivable that somewhere along the line the fairly long body constructed by kgpg (encrypted message blob) would get truncated resulting in no body in kmail due to invalid pgp block.

Reproducible: Always
Comment 1 Denis Kurz 2017-05-19 07:48:38 UTC
Trying to send keys via mail from KGpg still results in a message window with empty body using both PIM 5.5.1 and KGpg 17.04.1.