You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cce502b
Browse filesBrowse the repository at this point in the historyBrowse files
Audit P0 #1 + #2. The user-controlled topic became a session-dir path
segment via a naive .replace(' ','-') slug in FOUR places, none of which
stripped '/', '\\' or '..' — and the dir is later rmtree'd on failure,
so a topic like '../../x' was a real escape+delete vector.
- New slug_session_dir() collapses everything outside [a-z0-9] to '-' and
falls back to 'session' when empty; session_dir_name() routes through it.
- Replace the three inline duplicate slugs (web PTY/ttyd _start.py, CLI
session/start.py) with the shared helper — root-cause fix, one segment.
- Add server-side ACP capability guard in _start_acp_session: a PTY-only
agent (Claude Code, Codex) requesting transport=acp now gets a 400 with
cause + repair BEFORE any spawn, instead of an opaque failure.
- ACP_CAPABLE_AGENTS is the single source of truth; _options.py's picker
flags now reference it instead of a duplicated {kiro,gemini,grok} literal.
Tests: parametrized traversal cases + empty-slug fallback + ACP-guard
rejection for claude/codex + capable-set lock. Held-out gate: the traversal
tests fail on the pre-fix slug (verified by revert), pass on the fix.
0 commit comments