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.
This commit is contained in:
Erwan Le Goas 2022-09-29 10:28:44 +02:00 committed by Christopher Faulet
parent 9ac3ccb03f
commit 1caa5351e5

View File

@ -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 {