mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-09 06:52:19 +00:00
* fix(cli): sanitize store_addrs in kvbackend build log Close #7525. The CLI's kvbackend construction log was printing raw store_addrs which could contain sensitive connection strings (e.g. PostgreSQL DSNs with passwords). Changes: - Add sanitize_store_addrs() helper that reuses common_meta::kv_backend::util::sanitize_connection_string(), consistent with MetasrvOptions and StartCommand patterns. - Replace raw store_addrs in the info! log with sanitized version. - Add unit tests covering MySQL URLs, PostgreSQL DSNs, etcd addresses, and empty store_addrs cases. Signed-off-by: qiang_liu Signed-off-by: qiang_liu <qiang_liu@trendmicro.com> Signed-off-by: LiuQhahah <liuqiang9596@gmail.com> * fix(cli): drop redundant sanitize tests per review sanitize_connection_string in common_meta already covers MySQL URLs, PostgreSQL DSNs and credential-free etcd addresses with its own tests. The added tests only exercised a trivial map+collect wrapper, so remove them per review nit. Signed-off-by: LiuQhahah <liuqiang9596@gmail.com> --------- Signed-off-by: qiang_liu Signed-off-by: qiang_liu <qiang_liu@trendmicro.com> Signed-off-by: LiuQhahah <liuqiang9596@gmail.com> Co-authored-by: dennis zhuang <killme2008@gmail.com>