chore: use isPathInside consistently#40495
Conversation
Test results for "MCP"86 failed 6735 passed, 927 skipped Merge workflow run. |
Test results for "tests 1"10 failed 5 flaky41556 passed, 784 skipped Merge workflow run. |
| else | ||
| if (!artifact) | ||
| throw new Error(`Cannot install ${channel} on ${process.platform}`); | ||
| const location = String(artifact.location); |
| } | ||
| } | ||
|
|
||
| function computeAllowedHosts(requested: string | undefined, bound: string, port: number): Set<string> | null { |
There was a problem hiding this comment.
is requested actually '::1' not '[::1]'?
Summary
isPathInside/resolveWithinRoothelpers in@utils/fileUtilsand use them across the MCP tools backend, HAR replay, blob report merge, trace viewer/filehandler, andserveFolder/trace/filehandler to confine path-based reads/writes to their intended roots.Hostheader on loopback HTTP bindings to defeat DNS rebinding againstshow-reportand the trace viewer.run-serverclients unless--unsafeis set.