haproxy public development tree
Go to file
Aurelien DARRAGON 5313570605 BUG/MINOR: http_rules: fix errors paths in http_parse_redirect_rule()
http_parse_redirect_rule() doesn't perform enough checks around NULL
returning allocating functions.

Moreover, existing error paths don't perform cleanups. This could lead to
memory leaks.

Adding a few checks and a cleanup path to ensure memory errors are
properly handled and that no memory leaks occurs within the function
(already allocated structures are freed on error path).

It should partially fix GH #2130.

This patch depends on ("MINOR: proxy: add http_free_redirect_rule() function")

This could be backported up to 2.4. The patch is also relevant for
2.2 but "MINOR: proxy: add http_free_redirect_rule() function" would
need to be adapted first.

==

Backport notes:

-> For 2.2 only:

Replace:

    (strcmp(args[cur_arg], "drop-query") == 0)

with:

    (!strcmp(args[cur_arg],"drop-query"))

-> For 2.2 and 2.4:

Replace:

    "expects 'code', 'prefix', 'location', 'scheme', 'set-cookie', 'clear-cookie', 'drop-query', 'ignore-empty' or 'append-slash' (was '%s')",

with:

    "expects 'code', 'prefix', 'location', 'scheme', 'set-cookie', 'clear-cookie', 'drop-query' or 'append-slash' (was '%s')",
2023-05-11 15:37:04 +02:00
.github CI: more granular failure on generating build matrix 2023-05-08 14:05:44 +02:00
addons MEDIUM: tree-wide: Change sc API to specify required free space to progress 2023-05-05 15:44:23 +02:00
admin MINOR: acme.sh: add the deploy script for acme.sh in admin directory 2023-04-26 17:32:15 +02:00
dev DEV: flags/show-sess-to-flags: add support for color output 2023-05-10 17:48:00 +02:00
doc [RELEASE] Released version 2.8-dev11 2023-05-11 05:33:21 +02:00
examples EXAMPLES: fix IPV6 support for lua mailers script 2023-05-09 11:53:28 +02:00
include MINOR: proxy: add http_free_redirect_rule() function 2023-05-11 15:37:04 +02:00
reg-tests REGTESTS: use lua mailer script for mailers tests 2023-05-05 16:28:32 +02:00
scripts BUILD: ssl: switch LibreSSL to Fastly CDN 2023-04-26 18:41:03 +02:00
src BUG/MINOR: http_rules: fix errors paths in http_parse_redirect_rule() 2023-05-11 15:37:04 +02:00
tests TESTS: add a unit test for one_among_mask() 2022-06-21 20:29:57 +02:00
.cirrus.yml CI: cirrus-ci: bump FreeBSD image to 13-1 2023-04-23 09:44:53 +02:00
.gitattributes
.gitignore CLEANUP: exclude udp-perturb with .gitignore 2022-09-16 15:47:04 +02:00
.mailmap
.travis.yml
BRANCHES
CHANGELOG [RELEASE] Released version 2.8-dev11 2023-05-11 05:33:21 +02:00
CONTRIBUTING
INSTALL DOC: fix a few reported typos in the config and install doc 2023-05-07 07:10:55 +02:00
LICENSE
MAINTAINERS CLEANUP: assorted typo fixes in the code and comments 2022-11-30 14:02:36 +01:00
Makefile DEBUG: list: add DEBUG_LIST to purposely corrupt list heads after delete 2023-05-11 11:33:35 +02:00
README
SUBVERS
VERDATE [RELEASE] Released version 2.8-dev11 2023-05-11 05:33:21 +02:00
VERSION [RELEASE] Released version 2.8-dev11 2023-05-11 05:33:21 +02:00

The HAProxy documentation has been split into a number of different files for
ease of use.

Please refer to the following files depending on what you're looking for :

  - INSTALL for instructions on how to build and install HAProxy
  - BRANCHES to understand the project's life cycle and what version to use
  - LICENSE for the project's license
  - CONTRIBUTING for the process to follow to submit contributions

The more detailed documentation is located into the doc/ directory :

  - doc/intro.txt for a quick introduction on HAProxy
  - doc/configuration.txt for the configuration's reference manual
  - doc/lua.txt for the Lua's reference manual
  - doc/SPOE.txt for how to use the SPOE engine
  - doc/network-namespaces.txt for how to use network namespaces under Linux
  - doc/management.txt for the management guide
  - doc/regression-testing.txt for how to use the regression testing suite
  - doc/peers.txt for the peers protocol reference
  - doc/coding-style.txt for how to adopt HAProxy's coding style
  - doc/internals for developer-specific documentation (not all up to date)