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

Ouverte
#3,299 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
csharp, postgresql

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
C#
Étoiles
569
Forks
107
Merge moyen
2 h 49 min
PR mergées (30 j)
397

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de fluentcms/FluentCMS

Toutes les issues de fluentcms/FluentCMS

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.