]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-act: make release_http_redir() more robust
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 08:25:15 +0000 (10:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Apr 2022 14:09:26 +0000 (16:09 +0200)
commit16daaf319c287b02e8e60e4616685427c33f2a06
tree5d1031c981c426d816da3bb859426ded5ca64fc0
parent643f1b7befa9c97575aa41d705606c6fda4ed94c
BUG/MINOR: http-act: make release_http_redir() more robust

Since commit dd7e6c6dc ("BUG/MINOR: http-rules: completely free incorrect
TCP rules on error") free_act_rule() is called on some error paths, and one
of them involves incomplete redirect rules that may cause a crash if the
rule wasn't yet initialized, as shown in this config snippet:

   frontend ft
      mode http
      bind *:8001
      http-request redirect location /%[always_false,sdbm]

Let's simply make release_http_redir() more robust against null redirect
rules.

No backport needed since it seems that the only way to trigger this was
the extra check above that was merged during 2.6-dev.
src/http_act.c