]> git.cworth.org Git - notmuch/commit
dump: Disallow \n in message IDs
authorAustin Clements <amdragon@MIT.EDU>
Sun, 6 Jan 2013 20:22:40 +0000 (15:22 -0500)
committerDavid Bremner <bremner@debian.org>
Mon, 7 Jan 2013 02:40:01 +0000 (22:40 -0400)
commitd08c714b6a172cf0018bee4f60aff069d5508d4e
treed296a50e3fd67a2645d2462fdb9814fc540cafcc
parent7c3a995d6b6e066aa68b0adf0433f45cb3812c2a
dump: Disallow \n in message IDs

When we switch to using regular Xapian queries in the dump format, \n
will cause problems, so we disallow it.  Specially, while Xapian can
quote and parse queries containing \n without difficultly, quoted
queries containing \n still span multiple lines, which breaks the
line-orientedness of the dump format.  Strictly speaking, we could
still round-trip these, but it would significantly complicate restore
as well as scripts that deal with tag dumps.  This complexity would
come at absolutely no benefit: because of the RFC 2822 unfolding
rules, no amount of standards negligence can produce a message with a
message ID containing a line break (not even Outlook can do it!).

Hence, we simply disallow it.
notmuch-dump.c
test/random-corpus.c