Files
rea/src/server/environment
ithis0623-png aff5e23ecf fix(environment): refuse UNC pathname in file:// URI before fileURLToPath (#6272)
When a file:// URI contains leading slashes representing a UNC path (such as file:////remote.example.test/share/state.json), Node's fileURLToPath on Windows throws ERR_INVALID_FILE_URL_PATH because it expects a drive letter or Windows UNC format. This was caught and misreported as 'a file:// uri names a local absolute path' instead of the intended 'a file:// uri names a path on this host, not a network share'.

Testing UNC_PATH against url.pathname before calling fileURLToPath ensures that UNC paths are consistently recognized and refused as network shares across platforms.

Co-authored-by: ithis0623-png <ithis0623-png@users.noreply.github.com>
2026-10-22 17:50:25 +08:00
..