about summary refs log tree commit homepage
path: root/MANIFEST
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-16 05:05:40 +0000
committerEric Wong <e@yhbt.net>2020-06-16 21:41:56 +0000
commit07caa8528db2ac22d81a0763e1cefd59acd827f1 (patch)
treeaae828ad005dc59ad66d9e7d620d81bf669ba796 /MANIFEST
parent95efed60fe2d20ee4382c485e7faf58b3fee25af (diff)
downloadpublic-inbox-07caa8528db2ac22d81a0763e1cefd59acd827f1.tar.gz
For properly parsing IMAP search requests, it's easier to use a
recursive descent parser generator to deal with subqueries and
the "OR" statement.

Parse::RecDescent was chosen since it's mature, well-known,
widely available and already used by our optional dependencies:
Inline::C and Mail::IMAPClient.  While it's possible to build
Xapian queries without using the Xapian string query parser;
this iteration of the IMAP parser still builds a string which is
passed to Xapian's query parser for ease-of-diagnostics.

Since this is a recursive descent parser dealing with untrusted
inputs, subqueries have a nesting limit of 10.  I expect that is
more than adequate for real-world use.
Diffstat (limited to 'MANIFEST')
-rw-r--r--MANIFEST2
1 files changed, 2 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 6d94749f..3e7d4cc0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -133,6 +133,7 @@ lib/PublicInbox/IMAP.pm
 lib/PublicInbox/IMAPClient.pm
 lib/PublicInbox/IMAPD.pm
 lib/PublicInbox/IMAPdeflate.pm
+lib/PublicInbox/IMAPsearchqp.pm
 lib/PublicInbox/Import.pm
 lib/PublicInbox/In2Tie.pm
 lib/PublicInbox/Inbox.pm
@@ -271,6 +272,7 @@ t/httpd-unix.t
 t/httpd.t
 t/hval.t
 t/imap.t
+t/imap_searchqp.t
 t/imapd-tls.t
 t/imapd.t
 t/import.t