Bug 433921 - Comma inside Quotation Marks in Recipient Name ("To" field) leads to the Recipient being dropped.
Summary: Comma inside Quotation Marks in Recipient Name ("To" field) leads to the Reci...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 5.16.1
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-03 20:04 UTC by Jayesh Badwaik (FZ Juelich)
Modified: 2022-03-21 07:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jayesh Badwaik (FZ Juelich) 2021-03-03 20:04:57 UTC
SUMMARY
In the "To" field, insert a name which has a comma inside it. For example, 

"Badwaik, Jayesh" <j.badwaik@fz-juelich.de>

The recipients gets dropped from the list of recipients in the SMTP log. 

STEPS TO REPRODUCE
1. Create a new mail.
2. In "To" field, enter the name "Badwaik, Jayesh" <j.badwaik@fz-juelich.de>
3. Send the mail.

OBSERVED RESULT
Observe that in the SMTP logs that the "To" commands of SMTP do not contain the recipient.

You need to enable SMTP Session Logging by setting KSMTP_SESSION_LOG and restarting akonadictl to observe this.

EXPECTED RESULT
The recipients should not be dropped.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Jayesh Badwaik (FZ Juelich) 2021-03-03 22:52:52 UTC
This line seems to be the issue:
https://github.com/KDE/kmail/blob/2b953d990fd7db69d1192171e92a40eee6a0b4aa/src/editor/kmcomposerwin.cpp#L557

            const QStringList lst = info.to.split(QLatin1Char(','));
Comment 2 Laurent Montel 2021-03-04 05:56:48 UTC
(In reply to Jayesh Badwaik (FZ Juelich) from comment #1)
> This line seems to be the issue:
> https://github.com/KDE/kmail/blob/2b953d990fd7db69d1192171e92a40eee6a0b4aa/
> src/editor/kmcomposerwin.cpp#L557
> 
>             const QStringList lst = info.to.split(QLatin1Char(','));

Hi,
for sure not :) "void KMComposerWin::insertSnippetInfo(const MailCommon::SnippetInfo &info)"

but indeed  this line can create some problem.
I will fix pb here.

What is the problem exactly ? mail is not sending ?
Comment 3 Laurent Montel 2021-03-04 06:03:19 UTC
Git commit c2faa6588fa880e30820282049fa51914ea82ba5 by Laurent Montel.
Committed on 04/03/2021 at 06:03.
Pushed by mlaurent into branch 'master'.

Fix extra mails

M  +3    -3    src/editor/kmcomposerwin.cpp

https://invent.kde.org/pim/kmail/commit/c2faa6588fa880e30820282049fa51914ea82ba5
Comment 4 Laurent Montel 2021-03-04 06:16:05 UTC
Could you send me your log (verify that there is not password and co) in private email.
Here it's ok.
Comment 5 Jayesh Badwaik (FZ Juelich) 2021-03-04 06:43:45 UTC
I have sent you the mail. 
I have been able to reproduce this on multiple machines (all Archlinux though). But since you say it is okay on your end, I need to check if this is an Archlinux problem. 

Let me check with Ubuntu machines.
Comment 6 Jayesh Badwaik (FZ Juelich) 2021-04-23 10:37:25 UTC
The intended commit does not solve the bug:
https://invent.kde.org/pim/kmail/commit/c2faa6588fa880e30820282049fa51914ea82ba5
Comment 7 Jayesh Badwaik (FZ Juelich) 2021-04-23 10:38:40 UTC
From what I see, I cannot insert a `,` in my addresses anymore. But if someone sends me an email where the address list as a comma in it, and I click "Reply" to that email. Then, the comma remains in the address field and causes issues.
Comment 8 Jayesh Badwaik (FZ Juelich) 2022-03-21 07:12:06 UTC
This issue is now solved. Thanks a lot.