Skip to content
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

Calling websocket.Dial() with a password that contains special characters returns ErrAuthFailed #1

Open
mikeder opened this issue Nov 20, 2024 · 0 comments · May be fixed by #2
Open

Comments

@mikeder
Copy link

mikeder commented Nov 20, 2024

Using the url.Url.String() method causes URL encoding on the url, specifically the path field, which is problematic for passwords that contain special characters.

Example:

package main

import (
	"fmt"
	"net/url"
)

func main() {
	u := url.URL{Scheme: "ws", Host: "127.0.0.1", Path: "$ecretP4ssword!#"}
	fmt.Println(u.String()) // ws://127.0.0.1/$ecretP4ssword%21%23
}
@mikeder mikeder linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant