-
Notifications
You must be signed in to change notification settings - Fork 957
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
fix(websocket): don't dial /dnsaddr
addresses
#5613
Conversation
## Description Returns `Error::InvalidMultiaddr` when `parse_ws_dial_addr` is called with `/dnsaddr`. As per its specification, `/dnsaddr` domains are not meant to be directly dialed, instead it should be appended with `_dnsaddr.` and used for DNS lookups afterwards ## Notes & open questions * Is it okay to return an error, or if it's a `/dnsaddr` should I perform a DNS lookup and resolve that DNS afterwards? * If so, how should I handle that case where DNS lookup returns multiple addresses? ## Change checklist - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [x] I have added tests that prove my fix is effective or that my feature works - [ ] A changelog entry has been made in the appropriate crates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Co-authored-by: Darius Clark <dariusc93@users.noreply.github.com>
websocket-websys needs this change too. |
I see, will update there as well |
Hello I just opened #5619 because I want to dial Would it make sense to simply support DNS multiaddr resolution in the browser? |
Also #5531 could enable this? |
@DougAnderson444 As described in #5601, this PR removes an incorrect handling of |
Updated websocket-websys (bf23e92) so that it returns cc: @dariusc93 |
Previous CI runs failed because I didn't update top-level versions, my bad. Can you restart the workflow? @oblique |
cc @jxs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks Yianis!
Description
Returns
Error::InvalidMultiaddr
whenparse_ws_dial_addr
is called with/dnsaddr
.As per its specification,
/dnsaddr
domains are not meant to be directly dialed, instead it should be appended with_dnsaddr.
and used for DNS lookups afterwardsRelated: #5529
Fixes: #5601
Notes & open questions
/dnsaddr
?Change checklist