6666be0652
The isWithinHome() check used path.relative() which is purely string-based and does not follow symlinks. A symlink inside the home directory pointing to an external path would bypass the containment check, allowing directory listing of arbitrary filesystem locations. Now uses fs.realpathSync() to resolve symlinks before the containment comparison, ensuring the real filesystem path is validated. Co-authored-by: ThankNIXlater <ThankNIXlater@users.noreply.github.com>