hwmonDaemon 'reopen closed duplicate' path bypasses Workflow Designer validation entirely via raw SQL #68

Open
opened 2026-09-01 00:07:08 -04:00 by jared · 0 comments
Owner

Severity: High

create_ticket_api.php (~lines 361-362) writes status = 'Open' via a raw SQL UPDATE, completely bypassing TicketModel::updateTicket() and WorkflowModel::isTransitionAllowed().

Impact: If an admin configures the Workflow Designer to disallow a direct Closed→Open transition (e.g. requiring Closed→In Progress instead), this automated dedup-reopen path still forces the ticket to Open unconditionally. This is the one status-write path in the entire codebase that never consults the workflow engine at all, contradicting the README's "Workflow Validation: Server-side validation prevents invalid status changes" claim for this specific trigger.

Fix: Route this reopen through TicketModel::updateTicket() (or at minimum consult WorkflowModel::isTransitionAllowed('Closed', 'Open')) so it respects whatever transition rules are actually configured, with a sensible fallback (e.g. transition to whatever status the Workflow Designer marks as the 'reopen' target) if a direct Closed→Open isn't allowed.

**Severity:** High `create_ticket_api.php` (~lines 361-362) writes `status = 'Open'` via a raw SQL `UPDATE`, completely bypassing `TicketModel::updateTicket()` and `WorkflowModel::isTransitionAllowed()`. **Impact:** If an admin configures the Workflow Designer to disallow a direct Closed→Open transition (e.g. requiring Closed→In Progress instead), this automated dedup-reopen path still forces the ticket to Open unconditionally. This is the one status-write path in the entire codebase that never consults the workflow engine at all, contradicting the README's "Workflow Validation: Server-side validation prevents invalid status changes" claim for this specific trigger. **Fix:** Route this reopen through `TicketModel::updateTicket()` (or at minimum consult `WorkflowModel::isTransitionAllowed('Closed', 'Open')`) so it respects whatever transition rules are actually configured, with a sensible fallback (e.g. transition to whatever status the Workflow Designer marks as the 'reopen' target) if a direct Closed→Open isn't allowed.
jared added the priority/highsecurityworkflow labels 2026-09-08 10:15:47 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/tinker_tickets#68