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},