Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Align retained webhook clear control with upstream normalization

pulse-triage[bot]a385ee7250cb
diff --git a/internal/api/alerting/notifications.go b/internal/api/alerting/notifications.go
index 9d49f24fb1..ccf64de6dc 100644
--- a/internal/api/alerting/notifications.go
+++ b/internal/api/alerting/notifications.go
@@ -510,7 +510,7 @@ func (h *NotificationHandlers) CreateWebhook(w http.ResponseWriter, r *http.Requ
}
}
-// restoreMaskedWebhookValues resolves only submitted placeholders. The editor
+// restoreStrictMaskedWebhookValues resolves only submitted placeholders. The editor
// sends a replacement map: explicit edits and omitted keys must not be undone
// just because another value is still masked. Header names are case-insensitive;
// custom-field names are not. Never store a placeholder without a saved value.
diff --git a/internal/api/alerting/notifications_test.go b/internal/api/alerting/notifications_test.go
index 8ab7555035..d16f2204ed 100644
--- a/internal/api/alerting/notifications_test.go
+++ b/internal/api/alerting/notifications_test.go
@@ -1418,7 +1418,7 @@ func TestWebhookEditPreservesOnlyMaskedValues(t *testing.T) {
map[string]string{"token": "synthetic-token", "channel": "new", "added": "new"}, false},
{"clear beside masks", map[string]string{"Authorization": masked, "Content-Type": ""},
map[string]string{"token": masked, "channel": ""},
- map[string]string{"Authorization": "synthetic-auth", "Content-Type": ""},
+ map[string]string{"Authorization": "synthetic-auth"},
map[string]string{"token": "synthetic-token", "channel": ""}, false},
{"header case is insensitive", map[string]string{"authorization": masked}, map[string]string{"token": masked},
map[string]string{"authorization": "synthetic-auth"}, map[string]string{"token": "synthetic-token"}, false},