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
Unknown Object (File)
Sun, Feb 9, 2:50 AM
Unknown Object (File)
Sun, Feb 9, 2:50 AM
Unknown Object (File)
Sun, Feb 9, 2:50 AM
Unknown Object (File)
Fri, Feb 7, 12:44 AM
Unknown Object (File)
Feb 3 2025, 11:43 PM
Unknown Object (File)
Jan 30 2025, 6:03 PM
Unknown Object (File)
Jan 28 2025, 9:42 AM
Unknown Object (File)
Jan 24 2025, 5:53 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
Branch
tokens1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14546
Build 18974: Run Core Tests
Build 18973: arc lint + arc unit

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.