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)
committerAdrian Bunk <bunk@debian.org>
Tue, 29 Apr 2025 13:56:20 +0000 (16:56 +0300)
commit23a57b129bb5fb22a103ab0d3376245be45d6382
tree8a14786b35a14f5e2005ca48ee4bc3fb8f3e1e38
parent44b5fb9b325abb53032e1cd8eb8477ec6f219c15
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