Hi!
On malformed json sent by clients to JsonWebsocketConsumer or AsyncJsonWebsocketConsumer, a JSONDecodeError is raised and left unhandled.
The unhandled exception stops the django process (which will be restarted by Daphne so that's OKish).
But this looks fragile to me: a malicious user could spam malformed messages, with various effects like having the admin inbox to quickly fill if AdminEmailHandler is used.
I think malformed messages should be logged and ignored, but not raise an unhandled exception, what do you think?
Related to #1339
Hi!
On malformed json sent by clients to
JsonWebsocketConsumerorAsyncJsonWebsocketConsumer, aJSONDecodeErroris raised and left unhandled.The unhandled exception stops the django process (which will be restarted by Daphne so that's OKish).
But this looks fragile to me: a malicious user could spam malformed messages, with various effects like having the admin inbox to quickly fill if AdminEmailHandler is used.
I think malformed messages should be logged and ignored, but not raise an unhandled exception, what do you think?
Related to #1339