-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net/http: does not verify validity of Host header #11206
Comments
I have a fix for this, for discussion purposes. I think it's 50% likely Brad will barf all over it, but hopefully his feedback will lead me to the right fix.. :) |
CL https://golang.org/cl/11241 mentions this issue. |
@jeffallen, Did you notify the mailing list that you were working on this ? as mentioned in https://golang.org/doc/contribute.html > Discuss your design I was working on the same bug and was just ready to submit it... |
For the record, it's not necessary to notify the mailing list when you are working on a simple bug fix. It's fine to say something on the github issue if you are worried about duplicating effort. |
A malformed Host header can result in a malformed HTTP request. Clean them to avoid this. Updates #11206. We may come back and make this stricter for 1.6. Change-Id: I23c7d821cd9dbf66c3c15d26750f305e3672d984 Reviewed-on: https://go-review.googlesource.com/11241 Reviewed-by: Russ Cox <rsc@golang.org>
Leaving open because the CL says "We may come back and make this stricter for 1.6." |
CL https://golang.org/cl/17892 mentions this issue. |
Request parsing does not verify validity of Host header, in particular it can contain spaces.
This leads to weird possibilities like:
which I guess can trick some other HTTP implementation.
go version devel +a1fe3b5 Sat Jun 13 04:33:26 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: