]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats: Be more strict on what is a valid request to the stats applet
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Feb 2019 14:15:23 +0000 (15:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Mar 2019 13:35:11 +0000 (14:35 +0100)
commit5d45e381b44fe0faf1a8dda92b471ee92a289f91
tree0fe5ea64cfa095f95d2cd36cb6ce67d7776f172d
parent2b9b6784b9bb70f71f625a4f67e7e009d893a579
BUG/MINOR: stats: Be more strict on what is a valid request to the stats applet

First of all, only GET, HEAD and POST methods are now allowed. Others will be
rejected with the status code STAT_STATUS_IVAL (invalid request). Then, for the
legacy HTTP, only POST requests with a content-length are allowed. Now, chunked
encoded requests are also considered as invalid because the chunk formatting
will interfere with the parsing of POST parameters. In HTX, It is not a problem
because data are unchunked.

This patch must be backported to 1.9. For prior versions too, but HTX part must
be removed. The patch introducing the status code STAT_STATUS_IVAL must also be
backported.
src/proto_http.c
src/proto_htx.c