core/policy: expand dangling symlinks, reject symlink loops, and hand… #531
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by pug205gti6 on 2026-11-25T02:00:36Z.
…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.
Imported from fxceless/victory-fork. Originally posted by Revens2 on 2026-11-25T07:37:14Z.
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.
Imported from fxceless/victory-fork. Originally posted by Headache3318 on 2026-11-25T09:25:35Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.