Commit 43754e28 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Passing a PGP message via KToolInvocation::invokeMailer() it will not show up in the composer

BUG: 332368
FIXED-IN: 5.19.2
parent 98d36087
Pipeline #132490 skipped
......@@ -13,7 +13,9 @@ using namespace MimeTreeParser;
PGPBlockType Block::determineType() const
const QByteArray data = text();
if (data.startsWith("-----BEGIN PGP SIGNED")) {
if (data.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK-----")) {
return NoPgpBlock;
  • Are you sure this is correct? There is an explicit PublicKeyBlock just a few lines below.

Please register or sign in to reply
} else if (data.startsWith("-----BEGIN PGP SIGNED")) {
return ClearsignedBlock;
} else if (data.startsWith("-----BEGIN PGP SIGNATURE")) {
return SignatureBlock;
......@@ -47,6 +49,9 @@ QVector<Block> MimeTreeParser::prepareMessageForDecryption(const QByteArray &msg
if (msg.isEmpty()) {
return blocks;
if (msg.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK-----")) {
return blocks;
if (msg.startsWith("-----BEGIN PGP ")) {
start = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment