Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending a long message prevents a client to play #2

Open
1 of 2 tasks
lthms opened this issue Feb 3, 2018 · 0 comments
Open
1 of 2 tasks

Sending a long message prevents a client to play #2

lthms opened this issue Feb 3, 2018 · 0 comments

Comments

@lthms
Copy link
Member

lthms commented Feb 3, 2018

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)
@lthms lthms changed the title Sending a long message through the websocket crashes the server Sending a long message prevents a client to play Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant