Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe POSIX ChangesPOSIX realpath resolution
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The realpath fix preserves symlink traversal semantics and is covered across the affected API forms. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
What does this PR do?
Fixes POSIX
node:fsrealpath handling when..follows a symlink. The native implementation first normalized the input to an absolute path, solink/../targetcould resolve to a lexical collision besidelinkinstead of followinglinkand then traversing to its parent.Pass the original NUL-terminated path to the OS so component traversal keeps POSIX semantics. The explicit input-length check preserves
ENAMETOOLONGbehavior, and Windows remains on its existing implementation.This was found while validating OpenClaw under Bun; the matching application workaround is tracked in openclaw/openclaw#144700.
AI assistance: This change was developed and reviewed with Codex.
How did you verify your code works?
cargo fmt --all -- --check, configured Prettier check, andgit diff --checkpassed.