Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Websocket connection undefined #252

Merged
merged 17 commits into from
Jan 18, 2019
Merged

Conversation

nicholasjpaterno
Copy link
Contributor

If you attempt a subscription, such as: eth_subscribe "pendingTransactions" via a ganache http server it will accept and subscribe your http connection to all future "pendingTransactions". If a client issues a subsequent eth_sendTransaction, our websocketServer will try to get that subscription it's message (over a connection that doesn't exist) and crash ganache-cli in the process.

This PR explicitly checks and rejects subscriptions over http. In addition, we add a safety check in the websocketServer if it attempts to respond to a non-existent connection.

Copy link
Member

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟🌟🌟🌟🌟; would review again.

@davidmurdoch davidmurdoch merged commit e17046e into develop Jan 18, 2019
@davidmurdoch davidmurdoch deleted the websocket-connection-undefined branch January 18, 2019 21:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants