From 55e2dc478de360a7da4788adfc9393a41a456787 Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Thu, 2 Apr 2026 17:59:41 -0700 Subject: [PATCH] Redact Apprise URLs --- .../components/settings/SettingsFanoutSection.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/settings/SettingsFanoutSection.tsx b/frontend/src/components/settings/SettingsFanoutSection.tsx index a4f7e58..d163924 100644 --- a/frontend/src/components/settings/SettingsFanoutSection.tsx +++ b/frontend/src/components/settings/SettingsFanoutSection.tsx @@ -643,16 +643,20 @@ function formatPrivateTopicSummary(config: Record) { return `${prefix}/dm:, ${prefix}/gm:, ${prefix}/raw/...`; } -function formatAppriseTargets(urls: string | undefined, maxLength = 80) { +function censorAppriseUrl(url: string): string { + const protoMatch = url.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//); + if (protoMatch) return `${protoMatch[0]}********`; + return '********'; +} + +function formatAppriseTargets(urls: string | undefined) { const targets = (urls || '') .split('\n') .map((line) => line.trim()) .filter(Boolean); if (targets.length === 0) return 'No targets configured'; - const joined = targets.join(', '); - if (joined.length <= maxLength) return joined; - return `${joined.slice(0, maxLength - 3)}...`; + return targets.map(censorAppriseUrl).join(', '); } function formatSqsQueueSummary(config: Record) {