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
(sandbox): refuse a newline in any form of a missing control path #1031
control_path_forms in scripts/claude-sandbox.sh (around :418-423) checks for a newline or CR only in the real path readlink -e returns. That path is empty when the control directory does not exist yet. The other forms are then split line by line (while read ... <<<"$forms", around :492-495), so a form that goes through a directory whose name contains a newline is split into pieces. None of the pieces matches a writable root, and control_visible misses the overlap.
Scenario: CONTROL_DIR=/x/link/triggers, /x/link -> "/a\nb", "/a\nb" is a project mount, and triggers does not exist yet. The "missing visible control path" refusal does not fire.
This cannot happen through Switchboard itself, because main.js creates <triggers>/processed before every sandboxed launch. It can happen when the wrapper is run by hand. Before #1024, a blanket refusal of any newline mount covered it.
Fix: refuse when the requested path, or its readlink -m form, contains a newline or CR. Add a Linux fake-bwrap case.
Activity
(sandbox): refuse a control path that only resolves to a newline form (…
(sandbox): refuse a control path that only resolves to a newline form (…