mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-17 13:32:18 +00:00
Resolve both sides of the source_doc containment check with fs.realpathSync.native (falling back to fs.realpathSync). With the JS realpath, a repo root reached through a Windows 8.3 short name stays in short form while an in-repo symlink whose target uses the long-path form resolves to the long form, so a legitimate in-repo doc was reported as "resolves outside repository root". Escapes outside the repo are still rejected. Adds a cross-platform regression test that models differing JS and native realpath results: in-repo docs are accepted through a short-form root and an outside target is still rejected. It fails on the previous implementation. Not required for the #3882 Windows CI fix; kept as a separate commit so it can be taken or dropped on its own.