-
Notifications
You must be signed in to change notification settings - Fork 13
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
Connections with bad Sec-WebSocket-Key header, read key from wrong position and send back bad data #12
Comments
Did you submit a PR to Bayou or SimpleWebTransport? Bayou depends on SimpleWebTransport, so that might be the best place to push a PR. |
I've got the changes in a private fork. |
Most issues within SimpleWebTransport are found first here, so not often we need to update from their git. |
As mentioned in the PR, on our side, I re-wrote the whole handshake/http part to parse the http headers independently, and the code is far more robust, and far cleaner now (instead of just doing string searches) - and also allowed me to read other http headers (eg. I can't share that fork but the gist of it is
Ran here
|
Sec-WebSocket-Key
is the correct spec key, but many clients send the wrong keySec-Websocket-Key
.Ngrok is one example (thus, bayou is incompatible with ngrok agent for WSS/SSL tunneling)
The bayou code does this
Due to the lack of error checking; this becomes
int start = -1 + 19
then reads the wrong key, adds the wrong guid and sends back duff data, and gets disconnected by any competent client.
Solutions
Will submit a PR
The text was updated successfully, but these errors were encountered: