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

http_proxy contains \r causes proxy error! #30293

Closed
QianChenglong opened this issue Feb 18, 2019 · 5 comments
Closed

http_proxy contains \r causes proxy error! #30293

QianChenglong opened this issue Feb 18, 2019 · 5 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@QianChenglong
Copy link

QianChenglong commented Feb 18, 2019

Get by proxy issue an error:
image

image

Find in proxy.go,parses http_proxy incorrectly when http_proxy contains \r\n(Win7):
image
image

@mvdan
Copy link
Member

mvdan commented Feb 18, 2019

Please don't paste screenshots, and give a short self-contained program that reproduces this issue.

Assuming you mean the HTTP_PROXY environment variable, why would its value even contain a \r character?

@j2gg0s
Copy link
Contributor

j2gg0s commented Feb 18, 2019

Characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include uppercase and lowercase
letters, decimal digits, hyphen, period, underscore, and tilde.

@mvdan mvdan added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 18, 2019
@bradfitz
Copy link
Contributor

How did \r\n get into your environment variable? Seems like that's the bigger problem.

In any case, this is fixed in Go 1.12 (in that we return a more explicit error earlier) and backported on the Go 1.11 and Go 1.10 branches, though we haven't cut new releases of those yet.

Closing as nothing to do, unless we hear otherwise.

@QianChenglong
Copy link
Author

I use the rapidee to manage my windows env.I copy that env setting from other.In rapidee, can't see any different!
I known the URI contains \r\n is invalid.But for robustness, program should not trust any user input .

@mvdan
Copy link
Member

mvdan commented Feb 19, 2019

The HTTP_PROXY environment variable should be used as-is. If you're getting newlines in there, you'll have problems with lots of software. You should file a bug with the software that added the newlines.

@golang golang locked and limited conversation to collaborators Feb 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants