mrkamel/search_cop

Inappropriate searches for dates and times

Closed this issue · 1 comments

Because of the following, search_cop will turn a search for "xyz09@example.com" into a range search on date and time fields.

::Time.parse("xyz09@example.com") #=> 2015-03-09 00:00:00 +0000
::Date.parse("xyz09@example.com") #=> Mon, 09 Mar 2015

One possible fix would be to use strptime with a documented format.

thanks for the report. right, it seems, like we have to use a white-list approach such that we can support a limit set of pre-defined date/time formats only.