-
Improvement
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
We have issues when sometimes users send us data with \x00 inside strings. Postgres rejects this when trying to insert it into a jsonb field (both in messybrainz and in timescale).
We should check for this in strings when validating user input at the API level (i.e. api_tools.validate_listen), and if any strings contain a null reject the request with HTTP 400. We could also consider doing this at an earlier stage such as immediately before we convert the input to a json object
We should also perform this validation when items come in from other sources, such as the spotify reader. For this reason, perhaps validate_listen is the right place to do it.
In the case that a user submits multiple items but only one of them is invalid, we should reject the entire request and not try and process valid items.
related: https://github.com/metabrainz/listenbrainz-server/pull/1371, https://github.com/metabrainz/listenbrainz-server/pull/1389
- duplicates
-
LB-558 Fix the sentry unicode error
- Closed