You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes! we implicitly support ISO8601 only because that is all we test and what we document, but the thing that makes this hard is we use rails controller validations so we are limited by what that allows. If you can figure out how to enforce ISO8601 in a rails controller validation, we should totally do it.
Date, Datetime, and Time validation is lacking. https://github.com/procore/brita/blob/master/lib/brita/type_validator.rb#L4
It currently matches a very generic range pattern that may lead to a database error when trying to parse an input value.
Here is an example:
datetime = DateTime.new(2016,12,24).to_s
=> "2016-12-24T00:00:00+00:00"
Constructing a query in postman with this value causes an error:
?filters[updated_at]=2016-12-24T00:00:00+00:00...2016-12-29T12:16:44+00:00
On the server this gets parsed into:
"filters"=>{"updated_at"=>"2016-12-24T00:00:00 00:00...2016-12-29T12:16:44 00:00"}
+
gets replaced with a blank space character.This passes the range pattern but fails at the database leading to a 500 error.
The text was updated successfully, but these errors were encountered: