[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] Review Request: Akonadi: Fix handling of CR and LF in
From:       "Frank Osterfeld" <frank.osterfeld () gmail ! com>
Date:       2009-06-20 10:55:38
Message-ID: 20090620105538.22331.12585 () localhost
[Download RAW message or body]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/865/
-----------------------------------------------------------

Review request for KDE PIM.


Summary
-------

When creating a collection with CR and/or LF in attribute values, the \
CollectionCreateJob gets stuck forever. That's because ImapParser doesn't quote CR \
and LF at all when creating the quoted string for the attribute value. According to \
[1], CR and LF are not allowed inside a quoted string. This patch fixes this by \
escaping LF as "\n" and CR as "\r" in ImapParser::quote() and resolving them again in \
ImapParser::parseQuotedString and ImapStreamParser;:parseQuotedString().

[1] http://tools.ietf.org/html/rfc3501  


Diffs
-----

  trunk/kdesupport/akonadi/libs/imapparser.cpp 983998 
  trunk/kdesupport/akonadi/server/src/imapstreamparser.cpp 983998 

Diff: http://reviewboard.kde.org/r/865/diff


Testing
-------

Added tests for CR, LF to kdepimlibs/akonadi/tests/collectionattributetest.cpp .
All tests pass after my modifications.
Successfully imported a RSS feed list containing LF in feed descriptions (which end \
up in a collection attribute and triggered this in the first place).


Thanks,

Frank

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic