Skip to content

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

@mikeder

Description

@mikeder

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions