mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-07 11:58:55 +00:00
BUG/MINOR: h2: ":path" must not be empty
As reported by h2spec, the h2->h1 gateway doesn't verify that ":path" is not empty. This is harmless since the H1 parser will reject such a request, but better fix it anyway. To backport to 1.8.
This commit is contained in:
parent
9470d2cd35
commit
cd4fe17a26
4
src/h2.c
4
src/h2.c
@ -83,6 +83,10 @@ static int h2_prepare_h1_reqline(uint32_t fields, struct ist *phdr, char **ptr,
|
||||
}
|
||||
}
|
||||
|
||||
/* 7540#8.1.2.3: :path must not be empty */
|
||||
if (!phdr[uri_idx].len)
|
||||
goto fail;
|
||||
|
||||
if (out + phdr[H2_PHDR_IDX_METH].len + 1 + phdr[uri_idx].len + 11 > end) {
|
||||
/* too large */
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user