Skip to content

Sending a long message prevents a client to play #2

Description

@lthms

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:

  • The client does not send irrelevant data through the websocket
  • The server does not crash if it happens (9f72b50)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions