Skip to content

fix(files): allow symlinked storage roots#63

Open
Qyra-One wants to merge 1 commit into
profullstack:mainfrom
Qyra-One:fix/files-safejoin-symlink-root
Open

fix(files): allow symlinked storage roots#63
Qyra-One wants to merge 1 commit into
profullstack:mainfrom
Qyra-One:fix/files-safejoin-symlink-root

Conversation

@Qyra-One

Copy link
Copy Markdown

Summary

  • fix safeJoin to canonicalize the area root before comparing it with EvalSymlinks output
  • keep the lexical containment check unchanged so traversal is still rejected before any symlink handling
  • add regression coverage for a symlinked/canonicalized area root and for a child symlink that escapes the area root

Fixes #62.

Test plan

go test ./internal/files
go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files safeJoin rejects valid paths under symlinked storage roots

1 participant