To test use the current HEAD of KDE/4.12, KDE/4.13, or master branch in kde:kgpg repository. The email composer will show up empty (or only with your signature). If you open the file caff.cpp and change the last argument to KToolInvocation::invokeMailer() from text to "test.mid(1)" or "text.mid(0).insert(0, QLatin1Char(' '))" then the text will show up in the composer. Reproducible: Always
Maybe here's another instance of this: see bug 332364 ?
No, that one doesn't use that code path. Also that one seems to hang in an endless loop, while this one behaves properly (it just ignores the data).
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present? If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Still in 5.3.0
*** Bug 398224 has been marked as a duplicate of this bug. ***
It seems this is still a problem in KMail 5.8.3
Still happens in 5.19.1.
Do you have a testcase how I can reproduce it ? I think it(s from kgpg.
Open KGpg, select any key, press Ctrl-C and select "send by mail".
Ok I can reproduce. All code works but displaying not work as we have code in cryptohelper.cpp which test if we have line as -----BEGIN and it thinks that it's a signature... => it will not displaying it. For the moment I don't have solution.
determineType() should identify it properly, maybe the caller just has wrong checks of the return code? While looking at it prepareMessageForDecryption() just below is also a bit too aggressive when trying to find something to decrypt, maybe it should call out to a variant of determineType() and properly look on the return code?
Git commit 43754e2876962e9db329eb72aa64d8b1babd7fb5 by Laurent Montel. Committed on 20/01/2022 at 13:01. Pushed by mlaurent into branch 'release/21.12'. Fix Passing a PGP message via KToolInvocation::invokeMailer() it will not show up in the composer FIXED-IN: 5.19.2 M +6 -1 mimetreeparser/src/cryptohelper.cpp https://invent.kde.org/pim/messagelib/commit/43754e2876962e9db329eb72aa64d8b1babd7fb5
what's about bug 332364 ?