A webhook sends its stored secret headers to a changed URL, and a NUL byte in an answer repeats the delivery

Aperta
#3,299 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, postgresql

Direzione di ricerca

Start with WebhookService.cs around lines 139, 353, and 424 to trace how masked headers are retained when a URL changes. Then read WebhookSender.cs around lines 96–107 and WebhookDeliveryJob.cs around lines 68–78 and 186–207 to follow answer storage and retry handling. Add regression tests for both acceptance cases and verify that a 2xx response containing a NUL byte is recorded as one successful delivery across providers.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

plugin security type:bug

Problem

  1. A kept *** header follows a changed URL. src/plugins/FluentCMS.Plugins.Webhooks/WebhookService.cs:139,353 keep the stored value for a header sent as *** without checking that the URL is unchanged (applied at :424). A webhooks.manage holder can repoint the webhook to a host of their own and receive headers that are write-only.
  2. An answer containing a NUL byte is delivered six times and dead-lettered on PostgreSQL. WebhookSender.cs:96-107 stores up to 4 KB of the answer as received, and WebhookDeliveryJob.cs:68-78 writes it to a text column, which PostgreSQL refuses for 0x00. The job throws after a 2xx, TakeOverAsync (:186-207) marks the attempt interrupted and schedules the next. The receiver gets duplicates, a WebhookDeadEvent is raised, and the webhook is disabled when DisableAfter is set. This was read from the code, not reproduced.

Proposal

  • Refuse *** when the scheme, host or port of the URL changes; the caller must send the value again.
  • Strip control characters from the stored excerpt.

Done together with #3268, which changes the same delivery job.

Acceptance

  • An update that changes the host and keeps a header as *** is refused with a problem naming the header
  • The same update with the URL unchanged, or only its path changed, keeps the header
  • A 2xx answer containing 0x00 is recorded as one successful delivery on every provider
  • Tests for each, failing before the fix

Found in the code review of 17 Nov 2026.

Lingua principale
C#
Stelle
569
Fork
107
Merge medio
2h 49m
PR unite (30g)
397

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.