HomePhabricator

(stable) Prevent typeahead sources from querying against empty tokens

Description

(stable) Prevent typeahead sources from querying against empty tokens

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.

Reviewers: chad

Reviewed By: chad

Subscribers: 20after4

Differential Revision: https://secure.phabricator.com/D16888

Details

Provenance
epriestleyAuthored on Nov 17 2016, 5:34 PM
epriestleyPushed on Nov 17 2016, 5:45 PM
Reviewer
chad
Differential Revision
D16888: Prevent typeahead sources from querying against empty tokens
Parents
rPfc71a7e92dc2: (stable) Discard stdout/stderr from the aphlict subprocess when running in…
Branches
Unknown
Tags
Unknown
Build Status
Buildable 14548
Build 18976: Run Core Tests