]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: contrib/prometheus-exporter: decode parameter and value only
authorWilliam Dauchy <w.dauchy@criteo.com>
Tue, 26 Nov 2019 11:56:26 +0000 (12:56 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Nov 2019 10:51:35 +0000 (11:51 +0100)
commitc65f656d75091db3087a752dbc956159392fc8f2
treefb835a2ab47a98ad3130a15adbfa88f5dab3ba18
parent931285353059ac16c18884cb0c0ee16b8f9de434
BUG/MINOR: contrib/prometheus-exporter: decode parameter and value only

we were decoding all substring and then parsing; this could lead to
consider & and = in decoding result as delimiters where it should not.
this patch reverses the order by first parsing and then decoding each key
and value separately.

we also stop parsing after number sign (#).

This patch should be backported to 2.1 and 2.0

Signed-off-by: William Dauchy <w.dauchy@criteo.com>
contrib/prometheus-exporter/service-prometheus.c