mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-30 13:27:27 -06:00
Findings 41 and 69. check_write resolved a path through links and compared the target with the write root, but safe_save puts its temporary file beside the path given and renames it over that entry; rename_file removes it. A link outside the root pointing in passed the check while the write landed outside. Write access now also requires the entry itself (resolved parent + literal name) inside the root; the existing target check still refuses an inside link that points out. Tests: file_access::tests::links_are_followed_before_comparing (extended), mcp automation_roots::a_link_outside_the_write_root_into_it_is_not_written. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>