rea/.github/workflows
yi111 f504c2a351
fix(javascript): decline source-map UNC references with an unusable host (#1372)
* fix(javascript): decline source-map UNC references with an unusable host

A source map can name a Windows share whose host a file URL cannot carry,
such as `\\bad host\share\a.js`. On the Node builds `engines` admits,
`pathToFileURL(path, { windows: true })` fails a native assertion and calls
`abort()` on Node 22.19-22.22, 24.11-24.15 and 26.0, so the process dies
with exit 134 instead of declining the reference. Node 22.23 and 24.16 raise
`ERR_INVALID_URL` instead, and older builds silently drop the host, so the
same reference resolves three different ways depending on the runtime.

Validate the UNC host before handing the path to Node. A host carrying a
forbidden host code point, a percent escape or nothing at all now resolves as
`unresolved` on every admitted build, and `npm test` passes the existing
`\\bad host\share\a.js` row everywhere. Well-formed UNC hosts and
drive-letter paths are untouched.

* fix(javascript): validate UNC hosts through IDNA before conversion

Reject Unicode source-map UNC hosts that URL/IDNA processing cannot use or normalizes to an empty hostname before calling Windows pathToFileURL. Keep the original source identity and preserve usable normalized hosts.

Exercise the built reference resolver in owned subprocesses, including U+00AD and U+200C as source names and source roots. The original PR implementation aborts under Node 22.22.2; the new regression isolates those signals from the test runner. Add this test to the existing Node 22 Windows CI step.

Validation: 64 focused tests pass on Node 22.22.2 and 24.18.0; npm run check and test discovery pass. Local verification ran on macOS; Windows verification remains with CI.

---------

Co-authored-by: Yi-111-a <yi-111-a@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-10 06:38:47 +08:00
..
ci.yml fix(javascript): decline source-map UNC references with an unusable host (#1372) 2026-10-10 06:38:47 +08:00
nativeaot-fixtures.yml feat(ghidra): integrate optional NativeAOT metadata recovery (#748) 2026-10-07 00:57:08 +08:00
pages.yml docs(website): add worked guides and keep Pages publishing manual (#925) 2026-10-07 18:40:11 +08:00
real-binary-layout.yml feat(native): inspect offline ELF layout through pwntools (#1037) 2026-10-08 14:22:08 +08:00
real-browser.yml feat(browser): trace captured website module imports (#879) 2026-10-07 14:59:52 +08:00
real-evm-interface.yml feat(evm): inspect offline bytecode interfaces through EVMole (#1051) 2026-10-08 15:32:05 +08:00
real-ghidra-windows.yml feat(ghidra): support native x86 PE applications on Windows (#1030) 2026-10-08 05:11:47 +08:00
real-hopper-linux.yml build: streamline local and CI validation 2026-07-22 16:06:28 +00:00
real-hopper.yml build: streamline local and CI validation 2026-07-22 16:06:28 +00:00
real-javascript-recovery.yml refactor(javascript): group domain semantics and contracts (#907) 2026-10-07 17:16:58 +08:00
real-recorded-crash.yml feat(native): inspect recorded crashes through pwntools and pwndbg (#1054) 2026-10-08 16:50:31 +08:00
real-web-network-captures.yml feat(browser): inspect historical web network captures (#992) 2026-10-08 07:53:41 +08:00
real-web-runtime.yml feat(browser): attribute native execution and listener sources (#917) 2026-10-07 21:45:07 +08:00
real-web-source-map.yml feat(browser): trace captured website source-map locations (#897) 2026-10-07 16:21:18 +08:00
release.yml fix(release): publish reviewed release PR merges 2026-10-09 08:44:47 +08:00
website-check.yml feat(website): add search metadata and automatic sitemap 2026-10-09 21:46:05 +08:00
website-pages.yml feat(website): add search metadata and automatic sitemap 2026-10-09 21:46:05 +08:00