navi-3d: a session id is a path segment, and it stops being a way out
...
The 3D server resolves paths itself, so the sandbox in areas.py never applies
to it: what Settings.resolve_path accepts, the tool opens, creates or
overwrites. It joined session_id onto session_files/ unvalidated, so
"../../../../.." resolved to "/" and every relative path was then "inside";
and it left ".." in a relative path unresolved before its containment check,
which is lexical — "../<other session>/x.scad" passed and only the OS
collapsed it at open time.
designer_3d grants navi-3d to the agent and to its subagents, so this was
host-wide read and write — compile_scad even creates the output's parent
directories — for an ordinary user, with the profile prompt as the only thing
in the way.
The id is validated as one segment now, and both branches resolve before
checking, which also catches a symlink leading out.
Eugene Sukhodolskiy
committed
5 hours ago