Skip to content

Commit ef477ba

Browse files
waleedlatif1claude
andcommitted
fix(execution): validate fromEventId query param in reconnection endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a5e8a30 commit ef477ba

File tree

1 file changed

+2
-1
lines changed
  • apps/sim/app/api/workflows/[id]/executions/[executionId]/stream

1 file changed

+2
-1
lines changed

apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export async function GET(
5858
}
5959

6060
const fromParam = req.nextUrl.searchParams.get('from')
61-
const fromEventId = fromParam ? Number.parseInt(fromParam, 10) : 0
61+
const parsed = fromParam ? Number.parseInt(fromParam, 10) : 0
62+
const fromEventId = Number.isFinite(parsed) && parsed >= 0 ? parsed : 0
6263

6364
logger.info('Reconnection stream requested', {
6465
workflowId,

0 commit comments

Comments
 (0)