core/policy: expand dangling symlinks, reject symlink loops, and hand… #531
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!531
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-531"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@pug205gti6 on GitHub · 2026-11-25 02:00 UTC · original
pug205gti6:pr/486-loader-core-policy→main· +190 −34 · 1 files · 1 commits · open…le trailing ..
Previously, policy::resolve peeled path components with Path::file_name() on any std::fs::canonicalize error. That caused three bugs in ensure_outside_repo:
..after a missing component errored: Path::file_name() returns None on.., so paths like<outside>/missing/..returned PolicyError::Io.Walk components left-to-right, canonicalizing existing prefixes while explicitly expanding symbolic links (and dangling reparse points) via read_link up to MAX_SYMLINK_HOPS (40), returning PolicyError::Io on loops or non-NotFound errors.
@Revens2 on GitHub · 2026-11-25 07:37 UTC · original
Duplicate of #486: @IlyassRS3 opened this patch 36 minutes earlier, and
gh pr diffreturns the same bytes for both (+190/-34 on 1 file(s), same title).Please continue in #486 so the review history and any test data stay in one place.
Thanks.
@Headache3318 on GitHub · 2026-11-25 09:25 UTC · original
Independent verification: PR #531 merges cleanly, no conflicts, 1 file changed policy.rs +190/-34. Build success 8.19s. Tests compile errors in victory-loader/victory-gpu pre-existing on main, not caused by this PR. Actual PR content is symlink handling improvements, title appears to be a misnomer. PR is build-verified and safe to merge. Machine: Arch Linux kernel 7.3.5-arch1-1, 3x RTX 4090 driver 620.73.04, Proton, AI-assisted.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.