From: Erwan Le Goas Date: Thu, 29 Sep 2022 08:28:44 +0000 (+0200) Subject: MINOR: cli: Add an anonymization on a missed element in 'show server state' X-Git-Tag: v2.7-dev7~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1caa5351e5a709e3082e06a6e65bc63e30e757d8;p=thirdparty%2Fhaproxy.git MINOR: cli: Add an anonymization on a missed element in 'show server state' Add HA_ANON_CLI to the srv->hostname when using 'show servers state'. It can contain sensitive information like 'www....com' No backport needed, except if anonymization mechanism is backported. --- diff --git a/src/proxy.c b/src/proxy.c index 6d59c838d4..12125dd7f8 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -2796,7 +2796,8 @@ static int dump_servers_state(struct stconn *sc) (long int)srv_time_since_last_change, srv->check.status, srv->check.result, srv->check.health, srv->check.state, srv->agent.state, - bk_f_forced_id, srv_f_forced_id, srv->hostname ? srv->hostname : "-", srv->svc_port, + bk_f_forced_id, srv_f_forced_id, + srv->hostname ? HA_ANON_CLI(srv->hostname) : "-", srv->svc_port, srvrecord ? srvrecord : "-", srv->use_ssl, srv->check.port, srv_check_addr, srv_agent_addr, srv->agent.port); } else {