Contract-rollback-guard checkte non-existerende enum-waarde 'ACTIVE' #128

Closed
opened 2026-05-26 18:23:56 +00:00 by jesse-a · 1 comment
Owner

Severity: LOW (was effectief no-op, dus geen exploit-pad)

In de DocuSeal-webhook checkte ik contract.status === "SIGNED" || contract.status === "ACTIVE" als rollback-guard. Maar ContractStatus heeft alleen: DRAFT|SENT|SIGNED|EXPIRED|TERMINATED|CANCELLED. ACTIVE bestaat niet, dus de || contract.status === "ACTIVE"-clausule was effectief altijd false. De guard werkte alleen voor SIGNED — wat in de praktijk de juiste eindstatus is. Geen real-world-impact, wel dood-code dat misleidend leesbaar was.

Fix: alleen status === "SIGNED" als skip-conditie + commentaar met de volledige enum-lijst.

Files: src/app/api/webhooks/docuseal/route.ts

**Severity: LOW** (was effectief no-op, dus geen exploit-pad) In de DocuSeal-webhook checkte ik `contract.status === "SIGNED" || contract.status === "ACTIVE"` als rollback-guard. Maar `ContractStatus` heeft alleen: `DRAFT|SENT|SIGNED|EXPIRED|TERMINATED|CANCELLED`. `ACTIVE` bestaat niet, dus de `|| contract.status === "ACTIVE"`-clausule was effectief altijd false. De guard werkte alleen voor `SIGNED` — wat in de praktijk de juiste eindstatus is. Geen real-world-impact, wel dood-code dat misleidend leesbaar was. **Fix**: alleen `status === "SIGNED"` als skip-conditie + commentaar met de volledige enum-lijst. **Files**: src/app/api/webhooks/docuseal/route.ts
Author
Owner

Opgelost in commit de87b11.

Opgelost in commit de87b11.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jesse-a/OpenCRM#128
No description provided.