If the client sends a long message to the websocket, the server crashes because Socket.Web.accept! (or even the underlying library) raises an exception. Thus, it is trivial for a malicious client to kill the server, making the game a lot less fun, but as @vhf found out, even a legit client can send such long message if, for instance, the browser has a cookie for the server url (e.g. localhost).
Ideally, we should take care that:
If the client sends a long message to the websocket, the server crashes because
Socket.Web.accept!(or even the underlying library) raises an exception. Thus, it is trivial for a malicious client to kill the server, making the game a lot less fun, but as @vhf found out, even a legit client can send such long message if, for instance, the browser has a cookie for the server url (e.g. localhost).Ideally, we should take care that: