]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http_ana: fix crash for http_proxy mode during uri rewrite
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Jul 2021 15:27:01 +0000 (17:27 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Jul 2021 16:09:52 +0000 (18:09 +0200)
commitb60fb8d5be9122c16b0fb416dc2500b87d541497
tree9d6ac64432c47b82faa092a111029c066163feab
parentc453f9547e14c563f7bdf03d68979a5083c0372b
BUG/MEDIUM: http_ana: fix crash for http_proxy mode during uri rewrite

Fix the wrong usage of http_uri_parser which is defined with an
uninitialized uri. This causes a crash which happens when forwarding a
request to a backend configured in plain proxy ('option http_proxy').

This has been reported through a clang warning on the CI.

This bug has been introduced by the refactoring of URI parser API.
  c453f9547e14c563f7bdf03d68979a5083c0372b
  MINOR: http: use http uri parser for path
This does not need to be backported.

WARNING: although this patch fix the crash, the 'option http_proxy'
seems to be non buggy, possibly since quite a few stable versions.
Indeed, the URI rewriting is not functional : the path is written on the
beginning of the URI but the rest of the URI is not and this garbage is
passed to the server which does not understand the request.
src/http_ana.c