Commit db37d0b2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 439218 - Quoted strings containing comma or brackets are not parsed...

Fix Bug 439218 - Quoted strings containing comma or brackets are not parsed correctly, causes message sending to fail

BUG: 439218
FIXED-IN: 5.18.0
parent 455ddbc2
Pipeline #73018 passed with stage
in 25 minutes and 52 seconds
......@@ -135,7 +135,9 @@ KMime::Types::AddrSpecList extractAddrSpecs(const KMime::Message::Ptr &msg, cons
{
KMime::Types::AddrSpecList result;
if (auto hrd = msg->headerByType(header.constData())) {
KMime::Types::AddressList al = MessageCore::StringUtil::splitAddressField(hrd->asUnicodeString().toUtf8());
// Don't use "asUnicodeString().toUtf8()" it removes \" from \"foo, bla\" <foo@kde.org> => send failed
// Bug 439218
KMime::Types::AddressList al = MessageCore::StringUtil::splitAddressField(hrd->as7BitString(false));
KMime::Types::AddressList::const_iterator alend(al.constEnd());
for (KMime::Types::AddressList::const_iterator ait = al.constBegin(); ait != alend; ++ait) {
KMime::Types::MailboxList::const_iterator mitEnd((*ait).mailboxList.constEnd());
......
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