<timestamp>Thursday, Aug 13, 2026, 10:09 AM (UTC+2)</timestamp>…
- User
Thursday, Aug 13, 2026, 10:09 AM (UTC+2)
@chat/apps/shared/src/tools/execute-sandboxed-code.ts:30-32 Check if this issue is valid — if so, understand the root cause and fix it. At apps/shared/src/tools/execute-sandboxed-code.ts, line 30:
When
filenameis empty, this refinement accepts it. The backend then tries to save theout/directory instead of a file and fails; require a non-empty filename. - Assistant
I'll verify whether an empty
filenameslips through the refine and how the backend handles it. - Assistant
Valid:
""passes the refine, and the backend buildsout/as the copy source. Requiring a non-empty filename and covering it in the test. - Assistant
Valid issue. The refine only blocked
.,.., and path separators —""still passed. Downstream,path.join(..., 'out', '')and`${OUTPUT_DIR}/`both resolve to theout/directory, so the copy treats a directory as a file and fails.Fix:
z.string().min(1)onsaveFileSchema.filename- Matching empty check in the backend defensive guard
- Test coverage for
''