prepareCriterion in CriteriaProcessor escaping already escaped date
johnywith1n opened this issue · 3 comments
johnywith1n commented
In criteriaProcessor.js, the function prepareCriterion
doesn't check if a value is already an escaped date when its processing NOT clauses.
This is creating SQL statements like:
SELECT * WHERE ((`message`.`createdAt` <> "\"2015-01-21 20:09:47\"" ) OR (`message`.`id` < 75 )) AND `message`.`createdAt` <= "2015-01-21 20:09:47" ORDER BY `message`.`createdAt` DESC, `message`.`id` ASC LIMIT 1
specifically:
"\"2015-01-21 20:09:47\""
I'm not sure if this also affects the cases below it, but they also don't check for already escaped dates.
johnywith1n commented
Was this check left out for any particular reason?
CWyrtzen commented
Ninja'd~
sailsbot commented
Thanks for posting, @johnywith1n. I'm a repo bot-- nice to meet you!
It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
- review our contribution guide to make sure this submission meets our criteria (only verified bugs with documented features, please; no questions, commentary, or bug reports about undocumented features or unofficial plugins)
- create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to the original issue. This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.
Thanks so much for your help!