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
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)
which are acknowledged as invalid properly.
The text was updated successfully, but these errors were encountered:
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_at
should 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.
The text was updated successfully, but these errors were encountered: