Homec4science

Prevent typeahead sources from querying against empty tokens

Authored by epriestley <git@epriestley.com> on Nov 17 2016, 18:34.

Description

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

Committed
epriestley <git@epriestley.com>Nov 17 2016, 18:45
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb4faf2e63ee6: Allow "harbormaster.createartifact" to decode raw HTTP parameter types of…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH625d5235a5bc: Prevent typeahead sources from querying against empty tokens (authored by epriestley <git@epriestley.com>).Nov 17 2016, 18:45