DocuSeal-webhook status-rollback: late decline/expired-events draaiden afgeronde deals terug #101
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jesse-a/OpenCRM#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: MEDIUM
In
src/app/api/webhooks/docuseal/route.tsoverschreven deform.declined/submission.declinedenform.expired/submission.expired-handlers de Quote-status onvoorwaardelijk naarREJECTED/EXPIRED, en Contract naarCANCELLED/EXPIRED. Een vertraagd (of replay-attack) event kon dus een al-geaccepteerde offerte of een al-ondertekend contract alsnog naar "afgewezen" draaien — een data-integriteit + audit-trail issue.Fix: status-rollback-guard toegevoegd:
status === "ACCEPTED"status === "SIGNED"In beide gevallen retourneert de webhook
{ ignored: "already-..." }zonder side effects.Files: src/app/api/webhooks/docuseal/route.ts
Opgelost in commit
8e18add.