-
Notifications
You must be signed in to change notification settings - Fork 10
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
Impossibility to catch error
event arising in connections during handshake
#76
Labels
Comments
This bug seems to be critical, because it can cause server downtime by spamming incorrect packets on connection. Needs to be fixed ASAP. |
aqrln
added a commit
that referenced
this issue
Feb 20, 2017
This commit fixes a critical issue that allowed to crash the server with an unhandled error event sending an invalid packet that causes parser error before a handshake. Fixes: #76
aqrln
added a commit
that referenced
this issue
Feb 20, 2017
This commit forces a connection to close if a transport emits error. Socket-related errors should have been already doing this, but parse errors just emitted error events that caused the invalid chunk to be parsed over and over again if the event was intercepted. Refs: #76
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, when a server is being created and someone sends incorrect first packet (which must be handshake, but can be anything), node will crash with message "Unhandled 'error' event", even if there is an
error
event listener for this server.That happens because we forward
error
event listener from transport to server (asconnectionError
) only after handshake was processed.I guess possible fix will be to forward
error
event to server on connection creation.The text was updated successfully, but these errors were encountered: