Bug 66453 - Text formatting breaks with GnuPG inline signatures
Summary: Text formatting breaks with GnuPG inline signatures
Status: RESOLVED NOT A BUG
Alias: None
Product: kmail
Classification: Applications
Component: encryption (show other bugs)
Version: 1.10.0
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: testcase, triaged
Depends on:
Blocks:
 
Reported: 2003-10-23 12:51 UTC by Yovko Lambrev
Modified: 2015-02-02 18:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
two test messages (2.18 KB, application/x-gzip)
2003-10-30 10:46 UTC, Yovko Lambrev
Details
English letter (2.10 KB, text/plain)
2003-10-30 10:48 UTC, Yovko Lambrev
Details
Bulgarian letter (2.08 KB, text/plain)
2003-10-30 10:49 UTC, Yovko Lambrev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yovko Lambrev 2003-10-23 12:51:11 UTC
Version:           1.5.4 (using KDE KDE 3.1.4)
Installed from:    RedHat RPMs
OS:          Linux

Recently I began using GnuPG with kmail (ver. 1.5 and 1.5.4) 
I live in Bulgaria and most of my emails are in Bulgarian (UTF-8 encoding) but sometimes (around 85% of cases) when I reply to an email that is GnuPG signed my kmail lose end-of-line formatting... When I write in English I have no problems...

Example:
-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1
сдйхскдфаксдфасдфгас'фгсаф'гсафгасфгасддфгсдфгсдфгс

On Thursday 23 October 2003 13:30, Yovko Lambrev wrote:| Пак проба...| | --| Best regards,| Yovko Lambrev, M.Sc., eng.| http://www.openintegra.com| OpenIntegra Ltd.| | This e-mail has been sent using Open Source software| | | | 
- -- Best regards,Yovko Lambrev, M.Sc., eng.http://www.openintegra.comOpenIntegra Ltd.
This e-mail has been sent using Open Source software
-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.3 (GNU/Linux)
iQCVAwUBP5et/1gX0gRhYGiZAQI/MgQAhyu/8z0MOTPMKrXyCH9cNizyMzz9W7JmZrJnydYpsf9lflnXuoeeyTdS2p0p6wGL4ofbj9r7tnA9sHIKf+A93b7KW3xTI6tDzrDn3Q2MP1N4ACNP8ScKKBIyr/x/6BYsBtd5+eRw8N4LWogTb/V4r9tjBX88Qe3Riv17LZDoCvg==Qxou-----END PGP SIGNATURE-----

My GnuPG is configured with option 'charset utf-8' in gpg.conf file and I don't have such problem with MozillaMail or any other mail client, but I want kmail working for me. My Linux is RedHat 9 - native unicode distribution and I have no problems with cyrillic at all - only this stupid bug in kmail...

Any ideas?
Comment 1 Ingo Klöcker 2003-10-24 10:07:00 UTC
Please attach a message which on reply demonstrates this bug to this bug report.
Comment 2 Yovko Lambrev 2003-10-29 12:31:52 UTC
OK
I will send to myself two test messages in English and in Bulgarian (UTF-8)
First letter is in English. See the source (I changed only email addresses)

Return-Path: <yovko@XXXXXXX.com>
Received: from ca.openintegra.com (ca.openintegra.com [193.68.191.206])
	by pan.openintegra.com (8.12.8p2/8.12.8) with ESMTP id h9TBEw9m074761
	for <yovko@XXXXXXX.net>; Wed, 29 Oct 2003 13:14:59 +0200 (EET)
	(envelope-from yovko@XXXXXX.com)
Received: from eos.net.local (213-240-194-147.ddns.cablebg.net [213.240.194.147])
	by ca.openintegra.com (8.12.10/8.12.8) with ESMTP id h9TBEkDp001738
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <yovko@XXXXXXXXX.net>; Wed, 29 Oct 2003 13:14:58 +0200
From: Yovko Lambrev <yovko@XXXXXXXXX.com>
Organization: OpenIntegra Ltd.
To: yovko@XXXXXXXXX.net
Subject: Test
Date: Wed, 29 Oct 2003 13:14:40 +0200
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200310291314.47058.yovko@XXXXXXXXX.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by pan.openintegra.com id h9TBEw9m074761
Status: R 
X-Status: N
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This
is
just
a
test

- -- 
Best regards,
Yovko Lambrev, M.Sc., eng.
http://www.openintegra.com
OpenIntegra Ltd.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iQIVAwUBP5+hJUQCdr+0qk8IAQLhig/+ONfC5dkEsgTLkSJ6gsLC0QvWTY4TNrhG
LK3/S6w7gEvOeuOmxFkMLs6xgtuoc3KV0ZqS7wz5S89NjxXqAcUdxVtY2pLoeNHe
XIU2khrx/HALz6eXl7V39u1XHhdwSuK5eV1T5nlVxQLxq0xV8DBfF/PN91lcNi4E
+mxHUW1d3p448ycXmJyO2BlLXh9vsdVfwfK+u13o4ZY8v0v1JUdXSqq5VqP2RG+U
9MBAbLNiUnyUxHkZKBcSGzgTNwH0rytTAe02hbza0eNIJl+TGiWqA9zkfhIMUevi
cWC5s8kQQNopQb/c6NeED8VwzHKAh+NhXBbH8CFdELQzffoW1AOp5R1lJAjM76nd
19K8PTIg6ywJoFqFM8SztwljAiAxpypy8aKfb3sQ3h79/sAQOIN7pLzevhQ5aDsF
mTudRXWC16vz2k5h5iKp7rut/Sb71/Ipv/T0OUjKO3r6MLn1XyzVroSR45dMA23h
js82QJW9sgzS8F/uv6yv3ih0y3B8rA3YqLpsLfwRCgpbMwxkpwZdtYRt1tZIYTbR
8WIwgqMhGKLfxSFQm/8NjbAHx+mOehq3VZmBeSnnrczjFW3mRdbElylL5Y/Gm9GG
yrU9iGCDqEDybdaeMFApjo3I0fhaAZKhVW+lRUSmkzCcTy4foiI5m3JigNd89be4
Hs2gyXe3TKc=
=OU7b
-----END PGP SIGNATURE-----


Everything is ok!
Second letter is the same in Bulgarian:

Това
е
само
тест

--
Best regards,
Yovko Lambrev, M.Sc., eng.
http://www.openintegra.com
OpenIntegra Ltd.


See what happens when I recieve it back:

Return-Path: <yovko@XXXXXXXX.com>
Received: from ca.openintegra.com (ca.openintegra.com [193.68.191.206])
	by pan.openintegra.com (8.12.8p2/8.12.8) with ESMTP id h9TBGB9m074783
	for <yovko@XXXXXXX.net>; Wed, 29 Oct 2003 13:16:13 +0200 (EET)
	(envelope-from yovko@openintegra.com)
Received: from eos.net.local (213-240-194-147.ddns.cablebg.net [213.240.194.147])
	by ca.openintegra.com (8.12.10/8.12.8) with ESMTP id h9TBG9Dp001741
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <yovko@XXXXXXX.net>; Wed, 29 Oct 2003 13:16:11 +0200
From: Yovko Lambrev <yovko@XXXXXXX.com>
Organization: OpenIntegra Ltd.
To: yovko@XXXXXXX.net
Subject: Test 2
Date: Wed, 29 Oct 2003 13:16:09 +0200
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200310291316.10437.yovko@XXXXXXXX.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by pan.openintegra.com id h9TBGB9m074783
Status: R 
X-Status: N
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1
Товаесамотест
- -- Best regards,Yovko Lambrev, M.Sc., eng.http://www.openintegra.comOpenIntegra Ltd.

-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.3 (GNU/Linux)
iQIVAwUBP5+heUQCdr+0qk8IAQLYrhAAl0rr2Qm3SIOYDHeh94Ga+HA4xYgiwWjDSXEXjUW0WnrEvdCp7+sY/d9GYyQm9jwhP8cfUjk7EkNVXtjPy+tqGyekZJqWigBj6G2OK6aVYfb/egAVROBdSh96CuYU9TfSWgMzL2qILVKrDwAhIGk+WDxJJnWX6PGSD2dlHLJmorr7shN0h4uxKsemuZ3kvXfTL2ToDA7b+Y0aS6a3OLkP+bwiF83I6TBeLo9JOdw1mKjhiSdroSp2W1tcDAhHcs6eEk+LS6rSkb7VXVHFg/+k42NEoIqmCrSWnbXaPTcA7xOOn83PWQYR+C+UX671QSlcxIwjtB5iATQxfAoX0b4D0f1jBPH/ElotLKUlMeCPuvkPgbsCB7D1R0PhNTNvpw9fQ6XOcseJkGsDb4WrKaSBwAzk77Sfzk8W4aeWDHUGyo5uEZrcz/Qj+LfWLKrYbYAreOjeZy4trwxeSDpUwmXojH0d3r1i9P7oE5Nyo7dlFHcQvQEqVeFacUJkqsBp+TzSzyxhNdBkbuVuAwZeIQ3AhukAQcm/p6iMea/AErHeHdKUAnoX9cva1IdTYlPlia/1Jk1zfNA/KjE1so/aqRxtUygNHo7fLoH96hX17kH8hvU4b+Ko2fRtd1JtTc1dea9aoK/id33lKMgr3B/LmIbUttd6EI1kRfyIn+5X+cG94hA==wese-----END PGP SIGNATURE-----

There is no End-Of-Lines at all...
Comment 3 Ingo Klöcker 2003-10-29 14:17:33 UTC
I wrote: please _attach_ the messages to this bug report. In the pasted form they are not really helpful because the original formatting is not preserved.
Comment 4 Yovko Lambrev 2003-10-29 14:34:36 UTC
Subject: Re:  Text formatting breaks with GnuPG inline signatures

Ingo "Kl�������������������������" wrote:
> ------- Additional Comments From kloecker@kde.org  2003-10-29 14:17 -------
> I wrote: please _attach_ the messages to this bug report. In the pasted form they are not really helpful because the original formatting is not preserved.
> 

Attached!

test1 - English - OK
test2 - Bulgarian - Broken
From yovko@openintegra.com Wed Oct 29 13:14:40 2003
Return-Path: <yovko@openintegra.com>
Received: from ca.openintegra.com (ca.openintegra.com [193.68.191.206])
	by pan.openintegra.com (8.12.8p2/8.12.8) with ESMTP id h9TBEw9m074761
	for <yovko@yovko.net>; Wed, 29 Oct 2003 13:14:59 +0200 (EET)
	(envelope-from yovko@openintegra.com)
Received: from eos.net.local (213-240-194-147.ddns.cablebg.net [213.240.194.147])
	by ca.openintegra.com (8.12.10/8.12.8) with ESMTP id h9TBEkDp001738
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <yovko@yovko.net>; Wed, 29 Oct 2003 13:14:58 +0200
From: Yovko Lambrev <yovko@openintegra.com>
Organization: OpenIntegra Ltd.
To: yovko@yovko.net
Subject: Test
Date: Wed, 29 Oct 2003 13:14:40 +0200
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200310291314.47058.yovko@openintegra.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by pan.openintegra.com id h9TBEw9m074761
Status: R 
X-Status: N
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This
is
just
a
test

- -- 
Best regards,
Yovko Lambrev, M.Sc., eng.
http://www.openintegra.com
OpenIntegra Ltd.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iQIVAwUBP5+hJUQCdr+0qk8IAQLhig/+ONfC5dkEsgTLkSJ6gsLC0QvWTY4TNrhG
LK3/S6w7gEvOeuOmxFkMLs6xgtuoc3KV0ZqS7wz5S89NjxXqAcUdxVtY2pLoeNHe
XIU2khrx/HALz6eXl7V39u1XHhdwSuK5eV1T5nlVxQLxq0xV8DBfF/PN91lcNi4E
+mxHUW1d3p448ycXmJyO2BlLXh9vsdVfwfK+u13o4ZY8v0v1JUdXSqq5VqP2RG+U
9MBAbLNiUnyUxHkZKBcSGzgTNwH0rytTAe02hbza0eNIJl+TGiWqA9zkfhIMUevi
cWC5s8kQQNopQb/c6NeED8VwzHKAh+NhXBbH8CFdELQzffoW1AOp5R1lJAjM76nd
19K8PTIg6ywJoFqFM8SztwljAiAxpypy8aKfb3sQ3h79/sAQOIN7pLzevhQ5aDsF
mTudRXWC16vz2k5h5iKp7rut/Sb71/Ipv/T0OUjKO3r6MLn1XyzVroSR45dMA23h
js82QJW9sgzS8F/uv6yv3ih0y3B8rA3YqLpsLfwRCgpbMwxkpwZdtYRt1tZIYTbR
8WIwgqMhGKLfxSFQm/8NjbAHx+mOehq3VZmBeSnnrczjFW3mRdbElylL5Y/Gm9GG
yrU9iGCDqEDybdaeMFApjo3I0fhaAZKhVW+lRUSmkzCcTy4foiI5m3JigNd89be4
Hs2gyXe3TKc=
=OU7b
-----END PGP SIGNATURE-----



From yovko@openintegra.com Wed Oct 29 13:16:09 2003
Return-Path: <yovko@openintegra.com>
Received: from ca.openintegra.com (ca.openintegra.com [193.68.191.206])
	by pan.openintegra.com (8.12.8p2/8.12.8) with ESMTP id h9TBGB9m074783
	for <yovko@yovko.net>; Wed, 29 Oct 2003 13:16:13 +0200 (EET)
	(envelope-from yovko@openintegra.com)
Received: from eos.net.local (213-240-194-147.ddns.cablebg.net [213.240.194.147])
	by ca.openintegra.com (8.12.10/8.12.8) with ESMTP id h9TBG9Dp001741
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <yovko@yovko.net>; Wed, 29 Oct 2003 13:16:11 +0200
From: Yovko Lambrev <yovko@openintegra.com>
Organization: OpenIntegra Ltd.
To: yovko@yovko.net
Subject: Test 2
Date: Wed, 29 Oct 2003 13:16:09 +0200
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200310291316.10437.yovko@openintegra.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by pan.openintegra.com id h9TBGB9m074783
Status: R 
X-Status: N
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1
Товаесамотест
- -- Best regards,Yovko Lambrev, M.Sc., eng.http://www.openintegra.comOpenIntegra Ltd.

-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.3 (GNU/Linux)
iQIVAwUBP5+heUQCdr+0qk8IAQLYrhAAl0rr2Qm3SIOYDHeh94Ga+HA4xYgiwWjDSXEXjUW0WnrEvdCp7+sY/d9GYyQm9jwhP8cfUjk7EkNVXtjPy+tqGyekZJqWigBj6G2OK6aVYfb/egAVROBdSh96CuYU9TfSWgMzL2qILVKrDwAhIGk+WDxJJnWX6PGSD2dlHLJmorr7shN0h4uxKsemuZ3kvXfTL2ToDA7b+Y0aS6a3OLkP+bwiF83I6TBeLo9JOdw1mKjhiSdroSp2W1tcDAhHcs6eEk+LS6rSkb7VXVHFg/+k42NEoIqmCrSWnbXaPTcA7xOOn83PWQYR+C+UX671QSlcxIwjtB5iATQxfAoX0b4D0f1jBPH/ElotLKUlMeCPuvkPgbsCB7D1R0PhNTNvpw9fQ6XOcseJkGsDb4WrKaSBwAzk77Sfzk8W4aeWDHUGyo5uEZrcz/Qj+LfWLKrYbYAreOjeZy4trwxeSDpUwmXojH0d3r1i9P7oE5Nyo7dlFHcQvQEqVeFacUJkqsBp+TzSzyxhNdBkbuVuAwZeIQ3AhukAQcm/p6iMea/AErHeHdKUAnoX9cva1IdTYlPlia/1Jk1zfNA/KjE1so/aqRxtUygNHo7fLoH96hX17kH8hvU4b+Ko2fRtd1JtTc1dea9aoK/id33lKMgr3B/LmIbUttd6EI1kRfyIn+5X+cG94hA==wese-----END PGP SIGNATURE-----

Comment 5 Yovko Lambrev 2003-10-29 14:39:58 UTC
Subject: Re:  Text formatting breaks with GnuPG inline signatures

Ingo "Kl�������������������������" wrote:
> 
> ------- Additional Comments From kloecker@kde.org  2003-10-29 14:17 -------
> I wrote: please _attach_ the messages to this bug report. In the pasted form they are not really helpful because the original formatting is not preserved.
> 

Or maybe tar.gz format
Comment 6 Ingo Klöcker 2003-10-30 00:49:00 UTC
Sorry, but it didn't work. Please go to http://bugs.kde.org/show_bug.cgi?id=66453 and add the messages with the "Create a New Attachment" function. Thanks in advance.
Comment 7 Yovko Lambrev 2003-10-30 10:46:04 UTC
Created attachment 2931 [details]
two test messages

The archive file contains two test messages - first in English (perfect) and
second in Bulgarian (broken).
Comment 8 Yovko Lambrev 2003-10-30 10:48:25 UTC
Created attachment 2932 [details]
English letter

The perfect letter
Comment 9 Yovko Lambrev 2003-10-30 10:49:04 UTC
Created attachment 2933 [details]
Bulgarian letter

Broken letter
Comment 10 Marc Mutz 2003-10-30 20:31:29 UTC
This:

X-MIME-Autoconverted: from base64 to 8bit by pan.openintegra.com id h9TBGB9m074
783

might be the culprit?

At least in the second message, quite a few line endings have been removed. As such, this is no valid PGP message anymore (the Hash: and Version: headers are on the same line as the -----BEGIN-FOO----- lines).

Does the mail look the same in you sent-mail folder?
Comment 11 Yovko Lambrev 2003-10-30 22:18:06 UTC
Subject: Re:  Text formatting breaks with GnuPG inline signatures

Marc Mutz wrote:
 > This:
 >
 > X-MIME-Autoconverted: from base64 to 8bit by pan.openintegra.com id
h9TBGB9m074
 > 783
 >
 > might be the culprit?
Actually I noticed that the problem is that every correct mail contains:

X-MIME-Autoconverted: from quoted-printable to 8bit

and every broken:

X-MIME-Autoconverted: from base64 to 8bit


My kmail is set to quoted-printable MIME...

 > At least in the second message, quite a few line endings have been
removed. As such, this is no valid PGP message anymore (the Hash: and
Version: headers are on the same line as the -----BEGIN-FOO----- lines).
 >
 > Does the mail look the same in you sent-mail folder?
No, it doesn't! In sent-mail folder letters are OK, but every cyrillic
(bulgarian) and PGP-signed email contains:
Content-Transfer-Encoding: base64
which isn't correct maybe because of presense of signature

If there is no signature the header is OK no matter of the language:
Content-Transfer-Encoding: quoted-printable

Best regards,
Yovko Lambrev

Comment 12 Dominik Tritscher 2008-08-31 22:45:51 UTC
This problem still exisits in 1.10.0. Tried with the testcases attached above.
Comment 13 quazgar 2013-03-26 22:48:47 UTC
Could this (if it is still a problem) be the same problem as bug #289728 or at least have a similar cause?
Comment 14 Sandro Knauß 2013-03-26 23:15:00 UTC
Is this still valid in KMail2? Please comment or close, thanks in advance.
Comment 15 Martin Koller 2015-02-02 18:33:29 UTC
No reply. closing