Attention is currently required from: Tatiana Bradley.
To view, visit change 506995. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil.
Patch set 2:Code-Review +2
Damien Neil submitted this change.
http2: validate Host header before sending
Verify that the Host header we send is valid.
Avoids sending a request that the server will reject,
possibly sending us into a retry loop.
No test in this CL, but this will be covered by the net/http
test added in CL 506996.
For golang/go#60374
Change-Id: I78867eb05293ad8ca1b02bc22fb626760949d4b8
Reviewed-on: https://go-review.googlesource.com/c/net/+/506995
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Damien Neil <dn...@google.com>
Reviewed-by: Tatiana Bradley <tatiana...@google.com>
---
M http2/transport.go
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/http2/transport.go b/http2/transport.go
index 4f08ccb..da53e83 100644
--- a/http2/transport.go
+++ b/http2/transport.go
@@ -1880,6 +1880,9 @@
if err != nil {
return nil, err
}
+ if !httpguts.ValidHostHeader(host) {
+ return nil, errors.New("http2: invalid Host header")
+ }
var path string
if req.Method != "CONNECT" {
To view, visit change 506995. To unsubscribe, or for help writing mail filters, visit settings.
Tatiana Bradley has uploaded this change for review.
http2: validate Host header before sending
Verify that the Host header we send is valid.
Avoids sending a request that the server will reject,
possibly sending us into a retry loop.
No test in this CL, but this will be covered by the net/http
test added in CL 506996.
For golang/go#60374
For golang/go#61076
Change-Id: I78867eb05293ad8ca1b02bc22fb626760949d4b8
Reviewed-on: https://go-review.googlesource.com/c/net/+/506995
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Damien Neil <dn...@google.com>
Reviewed-by: Tatiana Bradley <tatiana...@google.com>
(cherry picked from commit 63727cc58253c59c71cf8491bb4d7448990d63b8)
---
M http2/transport.go
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/http2/transport.go b/http2/transport.go
index 4ded4df..52dbc99 100644
--- a/http2/transport.go
+++ b/http2/transport.go
@@ -1743,6 +1743,9 @@
if err != nil {
return nil, err
}
+ if !httpguts.ValidHostHeader(host) {
+ return nil, errors.New("http2: invalid Host header")
+ }
var path string
if req.Method != "CONNECT" {
To view, visit change 507905. To unsubscribe, or for help writing mail filters, visit settings.
Tatiana Bradley has uploaded this change for review.
http2: validate Host header before sending
Verify that the Host header we send is valid.
Avoids sending a request that the server will reject,
possibly sending us into a retry loop.
No test in this CL, but this will be covered by the net/http
test added in CL 506996.
For golang/go#60374
For golang/go##61076
Change-Id: I78867eb05293ad8ca1b02bc22fb626760949d4b8
Reviewed-on: https://go-review.googlesource.com/c/net/+/506995
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Damien Neil <dn...@google.com>
Reviewed-by: Tatiana Bradley <tatiana...@google.com>
(cherry picked from commit 63727cc58253c59c71cf8491bb4d7448990d63b8)
---
M http2/transport.go
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/http2/transport.go b/http2/transport.go
index 30f706e..65d3b35 100644
--- a/http2/transport.go
+++ b/http2/transport.go
@@ -1848,6 +1848,9 @@
if err != nil {
return nil, err
}
+ if !httpguts.ValidHostHeader(host) {
+ return nil, errors.New("http2: invalid Host header")
+ }
var path string
if req.Method != "CONNECT" {
To view, visit change 507906. To unsubscribe, or for help writing mail filters, visit settings.
Tatiana Bradley uploaded patch set #2 to this change.
http2: validate Host header before sending
Verify that the Host header we send is valid.
Avoids sending a request that the server will reject,
possibly sending us into a retry loop.
No test in this CL, but this will be covered by the net/http
test added in CL 506996.
For golang/go#60374
For golang/go#61076
Change-Id: I78867eb05293ad8ca1b02bc22fb626760949d4b8
Reviewed-on: https://go-review.googlesource.com/c/net/+/506995
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Damien Neil <dn...@google.com>
Reviewed-by: Tatiana Bradley <tatiana...@google.com>
(cherry picked from commit 63727cc58253c59c71cf8491bb4d7448990d63b8)
---
M http2/transport.go
1 file changed, 3 insertions(+), 0 deletions(-)
To view, visit change 507906. To unsubscribe, or for help writing mail filters, visit settings.
Tatiana Bradley uploaded patch set #2 to this change.
http2: validate Host header before sending
Verify that the Host header we send is valid.
Avoids sending a request that the server will reject,
possibly sending us into a retry loop.
No test in this CL, but this will be covered by the net/http
test added in CL 506996.
For golang/go#60374
For golang/go#61075
Change-Id: I78867eb05293ad8ca1b02bc22fb626760949d4b8
Reviewed-on: https://go-review.googlesource.com/c/net/+/506995
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Damien Neil <dn...@google.com>
Reviewed-by: Tatiana Bradley <tatiana...@google.com>
(cherry picked from commit 63727cc58253c59c71cf8491bb4d7448990d63b8)
---
M http2/transport.go
1 file changed, 3 insertions(+), 0 deletions(-)
To view, visit change 507905. To unsubscribe, or for help writing mail filters, visit settings.
Tatiana Bradley abandoned this change.
To view, visit change 507906. To unsubscribe, or for help writing mail filters, visit settings.