MINOR: http: add new function http_path_has_forbidden_char()
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Aug 2023 13:24:54 +0000 (15:24 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 16 Dec 2023 16:41:30 +0000 (17:41 +0100)
commitbd402b0fdb27bc54dd96c4a2f094a3cb79d4ed90
tree8d52a968f4763f3c675f23d329f1d7f96b0ef35b
parent4de1f675d65bbcc7f408214ff08f1c3c92b1289c
MINOR: http: add new function http_path_has_forbidden_char()

Origin: https://git.haproxy.org/?p=haproxy-2.6.git;a=commit;h=c699bb17b7e334c9d56e829422e29e5a204615ec

As its name implies, this function checks if a path component has any
forbidden headers starting at the designated location. The goal is to
seek from the result of a successful ist_find_range() for more precise
chars. Here we're focusing on 0x00-0x1F, 0x20 and 0x23 to make sure
we're not too strict at this point.

(cherry picked from commit 30f58f4217d585efeac3d85cb1b695ba53b7760b)
 [ad: backported for following fix : BUG/MINOR: h2: reject more chars
  from the :path pseudo header]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit b491940181a88bb6c69ab2afc24b93a50adfa67c)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit f7666e5e43ce63e804ebffdf224d92cfd3367282)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
Gbp-Pq: Name MINOR-http-add-new-function-http_path_has_forbidden_.patch
include/haproxy/http.h