agentbbs/internal
Kyle Paul Zengo e345845c41 fix: canonicalize root in safeJoin to handle symlinked storage roots
When the configured storage root (or a system temp dir on macOS where
/var → /private/var) is reached through a symlink, filepath.EvalSymlinks
on a child path resolves to the canonical form, but within() was comparing
against the lexical root — causing valid paths to be rejected with
"files: path escapes its area".

Fix: resolve the root once with EvalSymlinks before the symlink guard
loop, and compare resolved paths against the canonical root. The initial
lexical containment check (line 108) still uses the original root so
that the returned path keeps the caller's expected prefix.

Adds two regression tests:
  - TestSafeJoinSymlinkedRoot: valid file under a symlinked root is accepted
  - TestSafeJoinChildSymlinkEscapeStillBlocked: escaping child symlink is still rejected

Fixes #62
2026-06-29 01:31:55 +00:00
..
admin Fix/pod public html bind mount (#30) 2026-06-15 08:06:32 -07:00
ascii Video calls (PairUX→ASCII), agent@ chat, and finger routes 2026-06-11 11:43:38 +00:00
auth feat(files): provision-user CLI + anonymous public HTTP serving 2026-06-25 18:19:08 +00:00
brand Use the Profullstack </> ASCII logo as the BBS banner 2026-06-14 16:46:59 +00:00
calls Video calls (PairUX→ASCII), agent@ chat, and finger routes 2026-06-11 11:43:38 +00:00
chat Video calls (PairUX→ASCII), agent@ chat, and finger routes 2026-06-11 11:43:38 +00:00
files fix: canonicalize root in safeJoin to handle symlinked storage roots 2026-06-29 01:31:55 +00:00
forgejo Merge branch 'feat/files-sftp' into feat/notify-creds 2026-06-23 10:46:00 +00:00
forwardemail Autonomous deploy + free-pod/Premium-email membership 2026-06-14 07:58:51 +00:00
games M3: AgentGames — agent-vs-agent games, ELO ladder, replays (#7) 2026-06-14 03:30:12 -07:00
hub Fix/pod public html bind mount (#30) 2026-06-15 08:06:32 -07:00
mail bbs.profullstack.com launch kit: provisioner, custom domains, email verify, ascii-live 2026-06-11 15:53:19 +00:00
mailbox fix(mailbox): verify SMTP STARTTLS against the mail host, not the dial IP 2026-06-23 15:54:30 +00:00
mailu Feat/mail all members (#55) 2026-06-23 03:38:31 -07:00
motd Wire shared MOTD into BBS hub and IRC 2026-06-25 11:51:06 +00:00
news fix: reject malformed NNTP OVER ranges instead of returning all articles (#48) 2026-06-22 05:22:58 -07:00
payments Rebrand paid tier to $99 Founding Lifetime Member 2026-06-14 12:46:23 +00:00
plugin fix(arcade): give ncurses games a TERM so they launch 2026-06-18 12:01:26 +00:00
pods feat(pods): SSH agent forwarding → git push from the pod with your key 2026-06-23 09:16:29 +00:00
qryptinvite Fix flaky TestTamperedTokenFails in qryptinvite 2026-06-14 17:05:30 +00:00
sandbox AgentBBS: M0 core hub, M1 arcade, pods with CoinPay membership 2026-06-11 11:08:17 +00:00
sites Free per-user homepages at <name>.<host> (wildcard subdomains) 2026-06-14 09:20:34 +00:00
source fix: block shared/reserved IP ranges in SSRF guard (#47) 2026-06-22 05:23:15 -07:00
store Merge remote-tracking branch 'origin/main' into feat/files-sftp 2026-06-23 10:42:32 +00:00
tor tor: premium tor-url / tor-irc / tor routes over Tor 2026-06-14 10:54:21 +00:00
ui Fix/pod public html bind mount (#30) 2026-06-15 08:06:32 -07:00