You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
filesystem: a client Root is allowed only in its realpath form, unlike command-line directories #5183
Command-line directories and client Roots are resolved differently. resolveAllowedDirectories in src/filesystem/index.ts keeps both the spelling a directory was given in and its realpath when the two differ, so on macOS /tmp and /private/tmp are both allowed. parseRootUri in src/filesystem/roots-utils.ts keeps only the realpath of each client Root.
When a client's Roots take over, a request that uses the Root's own spelling (for example /tmp/x for the root file:///tmp, a symlinked project directory, or a Windows mapped drive that resolves to a UNC path) fails the containment check in validatePath (src/filesystem/lib.ts) with "Access denied", although it names a path inside the Root.
Expected
A Root admits both its advertised form and its resolved form, as command-line directories do. Every requested path is still realpath'd and re-checked in validatePath, so access stays bounded by the resolved directories. The POSIX symlink case can be reproduced directly; the Windows mapped-drive case is unverified. #4129 was closed as a duplicate of #235, whose fix covered command-line directories only.
The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.
Activity
cliffhall commentedon Oct 20, 2026
Triage: Priority Medium (total 7)
buglabelFiled from the PR backlog triage (#4877). Board: Servers V2 (#43), Status
Incoming, awaiting maintainer review (no milestone yet).fix(filesystem): allow a client Root in its advertised form as well a…
fix(filesystem): allow a client Root in its advertised form as well a…
cliffhall commentedon Oct 27, 2026
Fixed by #5317, merged into v2/main.