Repository navigation
fix(server): reject foreign directory hints before location lookup - #54619
romanilyin wants to merge 2 commits into
Conversation
Port the request-boundary fix from anomalyco#40857 at 6192c2b to the current V2 Location middleware, global forms, debug eviction and PTY transport. Keep the existing single-decode, relative-path and default behavior.
Pin the latest published release and refresh its lockfile integrity. Keep the existing server-boundary API and behavior.
|
The following comment was made by an LLM, it may be inaccurate: |
|
I have marked this PR ready for review. It covers the request-boundary fix in #54617: reject foreign rooted directory hints before Location lookup across middleware, global forms, debug eviction and PTY connect. Persistent path identity and client migrations remain in #54615. The existing validation is 33 passing server tests / 243 assertions and passing typechecks/root Could a maintainer review the boundary behavior and the server-local wrapper? The implementation uses |
|
Thanks for putting this together, @romanilyin! The Please open it again with |
|
Replaced by #59414, now open and ready for review against |
Issue for this PR
Closes #54617. Part of #54615; ports the narrow fix from #40857 to v2.
Type of change
What does this PR do?
Validate query/header directory hints before all four request-based Location lookups: middleware, global forms, debug eviction and PTY connect. Foreign rooted syntax returns typed
InvalidRequestError(400) before lookup.The server-local wrapper uses
@romanilyin/[email protected]. Existing relative/default paths, query precedence and single transport decoding are preserved. Database and client-state identity remain separate umbrella stages.How did you verify your code works?
bun run checkpassed on WSL with Bun 1.4.2.custom-elements.d.tssymlinks because this Windows checkout stores them as plain text; their original bytes were restored before commit.Native Windows server integration has not yet been exercised. Maintainer feedback is requested on the dependency/wrapper choice; I can adapt the server-local wrapper to an in-tree implementation if preferred.
Screenshots / recordings
Not applicable; this changes HTTP validation.
Checklist