Skip to content

Commit fd234ac

Browse files
committed
fix(security): thread workflowId through all processQueuedResumes call sites
Closes residual cross-tenant IDOR gap where processQueuedResumes was called without a workflowId scope in persistPauseResult, startResumeExecution (success and error paths), and clearPausedCancellationIntent. workflowId was already in scope at each site — this wires it through to the existing optional parameter.
1 parent 94bc2e2 commit fd234ac

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class PauseResumeManager {
264264
.where(eq(pausedExecutions.id, existing.id))
265265
})
266266

267-
await PauseResumeManager.processQueuedResumes(executionId)
267+
await PauseResumeManager.processQueuedResumes(executionId, workflowId)
268268
}
269269

270270
static async enqueueOrStartResume(args: EnqueueResumeArgs): Promise<EnqueueResumeResult> {
@@ -504,7 +504,10 @@ export class PauseResumeManager {
504504
})
505505
}
506506

507-
await PauseResumeManager.processQueuedResumes(pausedExecution.executionId)
507+
await PauseResumeManager.processQueuedResumes(
508+
pausedExecution.executionId,
509+
pausedExecution.workflowId
510+
)
508511

509512
return result
510513
} catch (error) {
@@ -532,7 +535,10 @@ export class PauseResumeManager {
532535
contextId,
533536
error,
534537
})
535-
await PauseResumeManager.processQueuedResumes(pausedExecution.executionId)
538+
await PauseResumeManager.processQueuedResumes(
539+
pausedExecution.executionId,
540+
pausedExecution.workflowId
541+
)
536542
throw error
537543
}
538544
}
@@ -1689,7 +1695,7 @@ export class PauseResumeManager {
16891695
eq(pausedExecutions.status, 'cancelling')
16901696
)
16911697
)
1692-
await PauseResumeManager.processQueuedResumes(executionId)
1698+
await PauseResumeManager.processQueuedResumes(executionId, workflowId)
16931699
}
16941700

16951701
static async getPausedCancellationStatus(

0 commit comments

Comments
 (0)