Bug 313478 - Kmail adds newlines to inline-gpg-signed messages
Summary: Kmail adds newlines to inline-gpg-signed messages
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Unclassified
Component: crypto (show other bugs)
Version: 4.9.3
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-19 00:59 UTC by quazgar
Modified: 2013-03-24 21:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.10.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description quazgar 2013-01-19 00:59:45 UTC
When signing messages inline (no OpenPGP/MIME attachment), line endings in the message are mixed between \n (Unix line ending) and \r\n (DOS line ending). This equivalent to the output produced on the command line by 

  gpg --clearsign -a > test_output

The \r\n lines however do not arrive intact after sending: They seem to be converted to \n\n (two newlines), which breaks the signature. The sent-messages folder shows still a correct signature (with \r\n) but in the inbox the signature is shown as invalid (since all newlines from the original message have effectively doubled to \n\n).

This bug happens with several mail servers, it does not happen when sending the content of the above mentioned file test_output manually with e.g. Python's SMTP lib via the same mail servers.

Reproducible: Always

Steps to Reproduce:
1. Compose a multiline message.
2. Sign as Inline PGP.
3. Send message.
Actual Results:  
Each newline is doubled, GPG signatures are invalid.

Expected Results:  
Should not change newlines.
Comment 1 Sandro Knauß 2013-03-24 21:28:43 UTC
Git commit 0b476b100d0afcd144b05b21ce856971862e6c20 by Sandro Knauß.
Committed on 21/03/2013 at 01:35.
Pushed by knauss into branch 'KDE/4.10'.

Fixing newline issue with mailcomposer

Newlines for PGP inline signed/enc+signed mails are wrongly handled.
Newlines are replaced by <CR><LF> before creating the signature. This is
not recommended for inline messages.
FIXED-IN: 4.10.2
REVIEW: 109634

M  +7    -5    messagecomposer/signencryptjob.cpp
M  +7    -9    messagecomposer/signjob.cpp

http://commits.kde.org/kdepim/0b476b100d0afcd144b05b21ce856971862e6c20