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
When I send a request with a filter containing a variable that starts with a $, e.g. GET /cloud/articles/?filter={"$selected":true}, API probably passes is onto Mongo as a selection operator and the request hangs.
Expected behavior
If a field with that name doesn't exist and it's not a valid Mongo operator either, API should return the appropriate 4xx code (?) To be discussed (e.g. do we allow field names starting with $?)
The text was updated successfully, but these errors were encountered:
This was an issue caused by the MongoDB connector not propagating an error. It has been fixed in dadi/api-mongodb#67 and released as version 5.0.3 of @dadi/api-mongodb.
Additionally, #585 adds the correct status code and error message for this case.
When I send a request with a filter containing a variable that starts with a
$
, e.g.GET /cloud/articles/?filter={"$selected":true}
, API probably passes is onto Mongo as a selection operator and the request hangs.Expected behavior
If a field with that name doesn't exist and it's not a valid Mongo operator either, API should return the appropriate 4xx code (?) To be discussed (e.g. do we allow field names starting with
$
?)The text was updated successfully, but these errors were encountered: