Repository navigation
Replies: 2 comments
|
That round-trip contradicts the filesystem seam's contract.
const hostPath = resolve(path)
const mapped = fs.processPathFromHostPath(hostPath)
if (mapped === undefined || fs.processPath(await fs.resolve(mapped, { signal })) !== hostPath) throw ...The seam says otherwise. The security property the check needs is "this host path maps into this session's filesystem and still resolves", not "the backend's spelling equals the host's". Your option ① is the right shape: require a defined A test that pins it: a fake One caveat for the write-up: |
|
插件更新通告 / Plugin update(2026-11-14) dsh-plugin-wsl-env 文档全面改版,已合入仓库
CLI 能整个装进发行版时不需要本插件,判断表见 README。
|
Uh oh!
There was an error while loading. Please reload this page.
Bug:
verifyDesktopPathround-trip breaks against routing filesystems (translated / WSL workspaces) — "Path has no verified Host path"Originally reported in dsh-plugin-wsl-env#37 with an inspector-grade root-cause analysis by @Anonso (reproduced on 0.2.1-rc.5 and verified unchanged in the 0.2.2-rc.1 sources; filing here at the reporter's request since the main repo has issues disabled).
Symptom
In a WSL workspace (
\\wsl.localhost\Ubuntu\home\<user>\…), "open with default app" and "reveal in file manager" fail for any file: the sidebar reportsRemoteError gateway/bad-request: "Path has no verified Host path". Browsing, editing and previewing the same file work; a drive-letter target works.Root cause (verified against our sources too)
verifyDesktopPathrequiresprocessPath(resolve(processPathFromHostPath(hostPath))) === hostPath— i.e. it assumesprocessPath()returns the HOST spelling. But a routing filesystem intentionally translates coordinates:WslRoutingFileSystem.processPath()returns the LINUX spelling for a distro UNC target (docs/root-fs-routing.md§2.2), whileprocessPathFromHostPathkeeps the host implementation (UNC). The round trip can therefore never close for a translated target, and every entry ofsession.workspacePathApplicationsfails.Suggested fix (from the report, option ①)
Relax the verification to what the security property actually needs:
processPathFromHostPath(hostPath)non-empty ANDfs.resolve(mapped)succeeding — do not treatprocessPath()as the host spelling for a routing fs. A plugin that translates coordinates (like ours) then composes correctly, and ordinary host filesystems keep today's strict check.A plugin-side workaround (returning the host spelling from
processPath) was tested and unblocks open-in-app immediately, but it degrades the change feed andstat.absolutePathspellings back to UNC — we are not shipping that globally; the upstream fix is the right home.Environment: DSH 0.2.1-rc.5 / 0.2.2-rc.1 (unchanged between them), Windows 11 26H2, WSL 2.6.3, plugin 0.17.1 → 0.22.0 (all affected).
All reactions