Page MenuHomePhabricator

Prevent typeahead sources from querying against empty tokens
ClosedPublic

Authored by epriestley on Nov 17 2016, 5:44 PM.
Tags
None
Referenced Files
F15473856: D16888.diff
Sun, Apr 6, 2:16 AM
F15415869: D16888.id40658.diff
Thu, Mar 20, 8:02 AM
F15413381: D16888.id.diff
Wed, Mar 19, 6:22 PM
F15402898: D16888.id40657.diff
Tue, Mar 18, 12:55 AM
F15399889: D16888.id.diff
Mon, Mar 17, 8:18 AM
F15398686: D16888.id40658.diff
Mon, Mar 17, 1:14 AM
F15397543: D16888.diff
Sun, Mar 16, 8:57 PM
F15396969: D16888.diff
Sun, Mar 16, 5:17 PM
Subscribers

Details

Summary

Certain unusual queries, like [-], could tokenize into a list which included the empty string.

This would then convert into a query for ... LIKE "%" which just joins the entire table.

Instead: tokenize smarter; never return the empty token; add some test cases.

Test Plan

Ran unit tests. Queried for [[blah blah]], saw a reasonable query come out the other end.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Prevent typeahead sources from querying against empty tokens.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
epriestley added a subscriber: 20after4.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 17 2016, 5:44 PM
This revision was automatically updated to reflect the committed changes.