Add some security checks when handling a websocket connection.#155
Open
Add some security checks when handling a websocket connection.#155
Conversation
Check the Host and Origin headers for the incoming connection to verify the connection is allowed. The language is intended to allow the specific behaviour to be largely implementation defined, whilst recommending a default behaviour that prevents CSRF-type attacks (reject host headers that aren't an IP address or the server hostname, reject any requests with an origin header). Hopefully adding this text will ensure that implementations consider the security issues accepting a connection, even though it's not possible to give precise requirements that apply to all implementations.
Member
Author
|
I made an equivalent HTTP PR at w3c/webdriver#1634 I think that one might have better wording, but I'll leave this as is until one or the other is reviewed to see what people prefer. |
Contributor
Comment on lines
+574
to
+578
| Note: rejecting connections with unexpected values in the Host header | ||
| prevents DNS rebinding attacks. Implementations can opt to provide more | ||
| stringent controls where appropriate, for example only accepting connections | ||
| when the |host| value corresponds to a loopback interface [[!RFC5735]]. | ||
|
|
Contributor
There was a problem hiding this comment.
I'd add a note about the Docker edge case here as well: w3c/webdriver#1634 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check the Host and Origin headers for the incoming connection to
verify the connection is allowed.
The language is intended to allow the specific behaviour to be largely
implementation defined, whilst recommending a default
behaviour that prevents CSRF-type attacks (reject host headers that
aren't an IP address or the server hostname, reject any requests with
an origin header).
Hopefully adding this text will ensure that implementations consider
the security issues accepting a connection, even though it's not
possible to give precise requirements that apply to all
implementations.
💥 Error: 400 Bad Request 💥
PR Preview failed to build. (Last tried on Dec 3, 2021, 2:42 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.