Commit 4d05fdcb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix check body hash

it seems that kmail or kmime add a space before "This is a multi-part
message in MIME format."
=> it breaks check
parent 9762c7e9
Pipeline #52923 canceled with stage
......@@ -127,6 +127,11 @@ void DKIMCheckSignatureJob::start()
if (mBodyCanonizationResult.startsWith(QLatin1String("\r\n"))) { // Remove it from start
mBodyCanonizationResult = mBodyCanonizationResult.right(mBodyCanonizationResult.length() - 2);
// It seems that kmail add a space before this line => it breaks check
if (mBodyCanonizationResult.startsWith(QLatin1String(" This is a multi-part message in MIME format"))) { // Remove it from start
mBodyCanonizationResult.replace(QStringLiteral(" This is a multi-part message in MIME format"),
QStringLiteral("This is a multi-part message in MIME format"));
QFile caFile(QStringLiteral("/tmp/bodycanon-kmail.txt")); | QIODevice::Text);
Markdown is supported
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