mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
The fixes #529's review asked for, each with a test. - No inline handler. The button quoted the path inside onclick="...decodeURIComponent('<path>')", and encodeURIComponent leaves ' alone, so a file named x'-alert(1)-'.txt ran script in Codeman's origin and it's.txt was a syntax error. It is now bound in the existing .file-tree-item loops from the row's escaped data-path. - Symbolic links are refused, never followed. validateSessionFilePath() returns the realpath, so deleting AGENTS.md -> CLAUDE.md deleted CLAUDE.md and left the link dangling. The path as named is lstat'ed, a link answers 400, and the inode is compared again before the unlink. - The edit route's confinement whole: validateLocalSessionFilePath() behind withGuardedOutsideWorktree(), so an absolute path in a followed outside worktree obeys the same rules, and the sensitive, blocked and .git checks run on both the realpath and the path as named. - Adopted sessions are refused like remote ones (the /tmp exception of the older file surfaces is not copied to a new one); Docker workspaces are allowed, as on the edit route. The workspace is probed bounded first (#516). Errors are thrown with their status. - Deleting from search results re-runs the search, the row buttons stay visible on touch screens, the confirm and toasts have zh-CN text, and no button is drawn for remote or adopted sessions. - Docs: CLAUDE.md, architecture-invariants, api-reference and the Working With Files wiki page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>