Skip to content

net/url: in Parse, strip password when copying input into Error  #53993

@ekeric13

Description

@ekeric13

Slightly different iteration of this issue: #24572
Just using a different string

What version of Go are you using (go version)?

go1.18.4

Does this issue reproduce with the latest release?

With the latest stable release

What operating system and processor architecture are you using (go env)?

Reproduced in go playground

What did you do?

https://play.golang.com/p/8GXuAZ66w3V

	myUrl := "mysql://user:password@example.com:3306/db\n"
	_, err := url.Parse(myUrl)
	fmt.Println(err)

What did you expect to see?

parse "mysql://user:***@example.com:3306/db\n": net/url: invalid control character in URL

What did you see instead?

parse "mysql://user:password@example.com:3306/db\n": net/url: invalid control character in URL

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions