From 4ec79ed1dc55d49a0e76128b1c34c303bd98d662 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Thu, 20 Aug 2026 13:37:45 -0400 Subject: [PATCH] fix: centralize config redaction marker --- repeater/web/api_endpoints.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repeater/web/api_endpoints.py b/repeater/web/api_endpoints.py index 02dbdcd..f6413fa 100644 --- a/repeater/web/api_endpoints.py +++ b/repeater/web/api_endpoints.py @@ -38,6 +38,7 @@ from .companion_endpoints import CompanionAPIEndpoints from .update_endpoints import UpdateAPIEndpoints logger = logging.getLogger("HTTPServer") +REDACTED_CONFIG_VALUE = "*** REDACTED ***" POLICY_GROUP_KINDS = { "channel_hash": "channel_hashes", @@ -7823,13 +7824,13 @@ class APIEndpoints: tcp_cfg = exported.get("modem_tcp") if isinstance(tcp_cfg, dict) and "token" in tcp_cfg: - tcp_cfg["token"] = "*** REDACTED ***" + tcp_cfg["token"] = REDACTED_CONFIG_VALUE for radio_entry in exported.get("radios") or []: if not isinstance(radio_entry, dict): continue nested_tcp_cfg = radio_entry.get("modem_tcp") if isinstance(nested_tcp_cfg, dict) and "token" in nested_tcp_cfg: - nested_tcp_cfg["token"] = "*** REDACTED ***" + nested_tcp_cfg["token"] = REDACTED_CONFIG_VALUE # Redact identity keys in companion / room_server configs for section in ("room_servers", "companions"):