Bug 420849 - Adresses are incorrectly quoted if they contain a non-ascii character
Summary: Adresses are incorrectly quoted if they contain a non-ascii character
Status: CONFIRMED
Alias: None
Product: kmime
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-01 11:27 UTC by Antonio Rojas
Modified: 2020-05-07 19:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sample mail (4.43 KB, application/mbox)
2020-05-01 11:27 UTC, Antonio Rojas
Details
Result after saving as draft. (193 bytes, application/mbox)
2020-05-07 06:35 UTC, null
Details
witout probleme here (501 bytes, application/mbox)
2020-05-07 07:09 UTC, Laurent Montel
Details
Video of the issue (135.02 KB, video/webm)
2020-05-07 07:31 UTC, null
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2020-05-01 11:27:06 UTC
Created attachment 128056 [details]
sample mail

SUMMARY

If one of the message recipients contains a non-ascii character, *all* recipients starting from that one are quoted together and treated as only one address. This can cause serious message-loss issues: if you reply-all, then you may think you are replying to all but you are actually only sending the message to the last address.

Sample message attached. This message was sent to two addresses: "António <nqn76 - gmail.com>" and "António <arojas - archlinux.org>"
Comment 1 Antonio Rojas 2020-05-03 12:22:54 UTC
Caused by dfaaec1dc9ea6a1364d82a4fe8add90064c0199f in kmime. Please consider reverting it as this makes kmail totally unreliable for daily use.
Comment 2 null 2020-05-05 22:48:02 UTC
Not sure what the "unspecified" version refers to, but I cannot reproduce with KMail 5.14.0.

I could reproduce briefly with an older git master, by saving a new message with two addresses containing non-ascii characters in the Drafts folder and trying to reply to all. However, in addition I had to move "utf-8" to the top of KMail's "Charset" configuration page. In the default configuration with "us-ascii" on top it worked just fine.

That being said, with the current git master this seems to be fixed (at least for the moment). Possibly due to ea14bb921d43 in messagelib.

Could you try again?
Comment 3 Antonio Rojas 2020-05-06 14:33:54 UTC
"unspecified" refers to 5.14.0, which is not an available choice. Changing the order of the encoding list or backporting ea14bb921d43 to messagelib doesn't make any difference.
Comment 4 null 2020-05-06 17:26:44 UTC
I can now reproduce with KMail 5.14.0 and git master, KMail 5.13.3 is not affected.

The key is to use "To" for both addresses in the original mail, while by default KMail will use "CC" for the second address.

(This crucial step was missing from the description, and the attachment only included the reply mail from Gmail).

To summarize and provide the missing detailed "steps to reproduce" from the bug template:
- create new mail
- set first "To" address field to "ó-1 <1@1.com>"
- change second address field to "To", set to "ó-2 <2@2.com>"
- save draft
- observe the "To" field incorrectly changed to "ó-1 <1@1.com>,ó-2" <2@2.com>
- ("Reply to All" not necessary)
Comment 5 Laurent Montel 2020-05-07 04:57:26 UTC
I can't reproduce it.
Could you attach your testcase to this bug report please ?
Comment 6 null 2020-05-07 06:35:57 UTC
Created attachment 128211 [details]
Result after saving as draft.

That's what I get (slightly redacted) after the "save draft" step in Comment 4.

Maybe you could attach your result after that step too? This way we can check whether there are still some ambiguities in the steps to reproduce, resulting in not being able to reproduce.
Comment 7 Laurent Montel 2020-05-07 07:09:11 UTC
Created attachment 128214 [details]
witout probleme here
Comment 8 Laurent Montel 2020-05-07 07:15:43 UTC
To: =?ISO-8859-1?Q?=F3=2D2?= <2@2.com>, =?ISO-8859-1?Q?=F3=2D1?= <1@1.com> for me

To: =?ISO-8859-1?Q?=F3=2D1_=3C1=401=2Ecom=3E=2C=F3=2D2?= <2@2.com> for you.

how do you add them ?
in each line or all text in once ?
Comment 9 null 2020-05-07 07:31:38 UTC
Created attachment 128215 [details]
Video of the issue

Hm, I can't find anything wrong with your attachment from Comment 7. Perhaps it works for you due to a local patch not yet pushed to the repo?

(In reply to Laurent Montel from comment #8)
> how do you add them ?
> in each line or all text in once ?
As detailed in Comment 4, I used a separate lineedit for pasting each address.

I'll attach a video showing my steps.
Comment 10 Laurent Montel 2020-05-07 09:46:34 UTC
(In reply to xchain from comment #9)
> Created attachment 128215 [details]
> Video of the issue
> 
> Hm, I can't find anything wrong with your attachment from Comment 7. Perhaps
> it works for you due to a local patch not yet pushed to the repo?
> 
> (In reply to Laurent Montel from comment #8)
> > how do you add them ?
> > in each line or all text in once ?
> As detailed in Comment 4, I used a separate lineedit for pasting each
> address.
> 
> I'll attach a video showing my steps.

I can see that I add address as you but not same error.
Do you use build from master ? kmime/messagelib/kmail ?
Comment 11 null 2020-05-07 10:29:52 UTC
(In reply to Laurent Montel from comment #10)
> Do you use build from master ? kmime/messagelib/kmail ?
That's correct, as pointed out in Comment 4. I just pulled and rebuilt kmime, messagelib and kmail just to be sure, and completely removed all config files and databases. The issue is still there.

Reverting dfaaec1dc9ea6a1364d82a4fe8add90064c0199f in kmime as mentioned in Comment 1 fixes the problem.

Let me know if there are other things I could check to determine what's different on my system.
Comment 12 null 2020-05-07 19:31:21 UTC
58d42ed87387 disables dfaaec1dc9ea6a1364d82a4fe8add90064c0199f in kmime for the moment, so this should work again in master and 5.14.1.

Not sure what the plan is going forward, so I'll leave the bug status as is for the moment.