D28399: do not lose address headers when decrypting mail

Martin Koller noreply at phabricator.kde.org
Sun Mar 29 11:38:15 BST 2020


mkoller created this revision.
mkoller added reviewers: dvratil, mlaurent.
Herald added a project: KDE PIM.
Herald added a subscriber: kde-pim.
mkoller requested review of this revision.

REVISION SUMMARY
  CryptoUtils::copyHeader uses a wrong function to copy the header data.
  it uses fromUnicode(asUnicode), but kmime_headers.h states:
  "It is not guaranteed that fromUnicodeString( asUnicodeString(), ... ) will return the original string."
  
  I run into this bug where the From and To Headers contained data such as:
   "some name (bla)" <mail at a.b>
  
  but asUnicodeString() did not put quotes around "some name (bla)" so parsing did not work out and left the result empty.

TEST PLAN
  decrypt a mail containing From/To headers in the form
   "some name (bla)" <mail at a.b>

REPOSITORY
  R92 PIM: Common Mail Support

REVISION DETAIL
  https://phabricator.kde.org/D28399

AFFECTED FILES
  src/util/cryptoutils.cpp

To: mkoller, dvratil, mlaurent
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200329/96920277/attachment.html>


More information about the kde-pim mailing list