Commit 292a408
reject duplicate Host headers in request headers
Duplicate Host headers are now rejected with a ProtocolError.
This addresses a request smuggling primitive where a consumer
downgrading HTTP/2 to HTTP/1.1 would emit two Host header lines,
causing backend divergence (CWE-444).
The _validate_host_authority_header() function now counts Host
headers and raises ProtocolError if more than one is present,
covering both the receive path (_check_host_authority_header)
and the send path (_check_sent_host_authority_header).1 parent 04d3b87 commit 292a408
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
| |||
0 commit comments