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
{{ message }}
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
By experimentation I have determined that an invalid filter comparison parameter is ignored without warning. The result is that the filter that was intended is not applied without notice to the client.
Example:
c = BlockScore::Person.all('create_at[gt]' => Time.now.to_i+1)
should in fact return an empty array. However it returns most recent 25 Persons because the create_at should be created_at. This could leave the impression that interface code is working when in fact it is NOT.
Note that this is in contrast to mistyping the actual comparison operator:
c = BlockScore::Person.all('created_at[gtx]' => Time.now.to_i+1)
BlockScore::InvalidRequestError: (Type: invalid_request_error) Received unknown filter directive: gtx (gtx) (Status: 400)
which DOES return a suitable message.
...and in contrast to bad filter parameters
c = BlockScore::Person.all('filter[name_second]' => 'valid')
BlockScore::InvalidRequestError: (Type: invalid_request_error) Received unknown filter parameter: name_second (name_second) (Status: 400)
By experimentation I have determined that an invalid filter comparison parameter is ignored without warning. The result is that the filter that was intended is not applied without notice to the client.
Example:
should in fact return an empty array. However it returns most recent 25 Persons because the
create_atshould becreated_at. This could leave the impression that interface code is working when in fact it is NOT.Note that this is in contrast to mistyping the actual comparison operator:
which DOES return a suitable message.
...and in contrast to bad filter parameters
which are acknowledged as invalid properly.