Skip to content

vfs: resolve symlinks when checking rename descendants - #65904

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-rename-dir-symlink
Open

vfs: resolve symlinks when checking rename descendants#65904
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-rename-dir-symlink

Conversation

@trivikr

@trivikr trivikr commented Sep 8, 2026

Copy link
Copy Markdown
Member

Fixes: #65903

Check resolved source and destination parent paths before renaming a directory to prevent moving it into its own subtree through a symlink.


Assisted-by: codex

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Sep 8, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.22%. Comparing base (0de4fcc) to head (7510763).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65904      +/-   ##
==========================================
+ Coverage   90.17%   90.22%   +0.05%     
==========================================
  Files         771      771              
  Lines      265470   265475       +5     
  Branches    50463    50512      +49     
==========================================
+ Hits       239383   239531     +148     
+ Misses      17055    16906     -149     
- Partials     9032     9038       +6     
Files with missing lines Coverage Δ
lib/internal/vfs/providers/memory.js 95.86% <100.00%> (+0.86%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Check resolved source and destination parent paths before renaming a
directory to prevent moving it into its own subtree through a symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex
@trivikr
trivikr force-pushed the vfs-rename-dir-symlink branch from 648406e to 7510763 Compare September 11, 2026 03:40
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Labels

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: renaming a directory through a symlink into its descendant detaches the subtree

2 participants