haproxy public development tree
Go to file
Willy Tarreau 75fd2ff83a BUG/MEDIUM: arg: empty args list must be dropped
Before commit 80b53ffb1 ("MEDIUM: arg: make make_arg_list() stop after
its own arguments"), consumers of arguments would measure the length of
the string between the first opening and closing parenthesis before
calling make_arg_list(), and this latter one would detect an empty string
early by len==0 and would not allocate an argument list.

Since that commit, this has a changed a bit because the argument parser
is now the one in charge for delimiting the argument string, so the early
test cannot be used anymore. But the argument list is still allocated,
and despite the number of arguments being returned, consumers do not
necessarily rely on it but instead they rely on the non-null arg_p
pointer that used to be allocated only if at least one argument was
present. But as it's now always allocated, the first argument always
carries the first argument's type with an empty value, which confuses
all functions that take a unique optional argument (such as uuid()).

The proper long term solution would be to always use the returned argument
count, but at least we can make sure the function always returns an empty
argument list when fed with an empty set of parenthesis, as it always used
to do. This is what this patch does.

This fix must be backported to 2.2 and fixes github issue #763. Thanks to
Luke Seelenbinder for reporting the problem.
2020-07-21 15:53:54 +02:00
.github CI: extend spellchecker whitelist 2020-06-26 11:26:52 +02:00
contrib MINOR: contrib/prometheus-exporter: Add missing global and per-server metrics 2020-07-15 14:08:14 +02:00
doc DOC: ssl: req_ssl_sni needs implicit TLS 2020-07-19 06:36:12 +02:00
examples CLEANUP: assorted typo fixes in the code and comments 2020-06-26 11:27:28 +02:00
include MINOR: log: adds counters on received syslog messages. 2020-07-15 17:50:12 +02:00
reg-tests BUG/MINOR: http-rules: Fix ACLs parsing for http deny rules 2020-06-30 09:32:03 +02:00
scripts CI: travis-ci: switch BoringSSL builds to ninja 2020-06-26 11:26:26 +02:00
src BUG/MEDIUM: arg: empty args list must be dropped 2020-07-21 15:53:54 +02:00
tests MINOR: lists: rename some MT_LIST operations to clarify them 2020-07-10 08:50:41 +02:00
.cirrus.yml CI: cirrus-ci: exclude slow reg-tests 2020-07-04 06:58:14 +02:00
.gitignore DOC: create a BRANCHES file to explain the life cycle 2019-06-15 22:00:14 +02:00
.travis.yml CI: travis-ci: speed up osx build by running brew scripted, switch to latest osx image 2020-07-15 08:42:18 +02:00
BRANCHES DOC: assorted typo fixes in the documentation 2020-03-09 14:45:58 +01:00
CHANGELOG [RELEASE] Released version 2.3-dev1 2020-07-17 15:13:19 +02:00
CONTRIBUTING DOC: assorted typo fixes in the documentation and Makefile 2020-03-06 10:49:55 +01:00
INSTALL MINOR: version: back to development, update status message 2020-07-07 16:38:51 +02:00
LICENSE
MAINTAINERS REORG: include: split hathreads into haproxy/thread.h and haproxy/thread-t.h 2020-06-11 10:18:56 +02:00
Makefile MEDIUM: udp: adds minimal proto udp support for message listeners. 2020-07-15 17:50:12 +02:00
README DOC: create a BRANCHES file to explain the life cycle 2019-06-15 22:00:14 +02:00
ROADMAP
SUBVERS
VERDATE [RELEASE] Released version 2.3-dev1 2020-07-17 15:13:19 +02:00
VERSION [RELEASE] Released version 2.3-dev1 2020-07-17 15:13:19 +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)