vfs: resolve symlinks when checking rename descendants · nodejs/node@816790e · GitHub
Skip to content

Commit 816790e

Browse files
trivikraduh95
authored andcommitted
vfs: resolve symlinks when checking rename descendants
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 PR-URL: #65904 Fixes: #65903 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 975cac5 commit 816790e

2 files changed

Lines changed: 113 additions & 5 deletions

File tree

‎lib/internal/vfs/providers/memory.js‎

Lines changed: 10 additions & 5 deletions
Lines changed: 103 additions & 0 deletions

0 commit comments

Comments
 (0)