Repository navigation
fix(security): remove the /proxy-file route (0.8.1) - #319
Merged
Merged
Conversation
The development file proxy was registered in every environment and every framework adapter. It fetched any URL from its `url` query parameter with the visitor's cookies and served the response from the app's origin, so a crafted link could leak session cookies, run attacker HTML on the app's origin, or make the server fetch internal URLs. Protected hosted files now load directly from their file origin through the partitioned files cookie, so the proxy is no longer needed: - remove the route from all adapters, plus `fetchProxyFile` - stop rewriting protected URLs in the React client and backend client - keep `disableDevProxy` and the backend client `baseUrl` as deprecated no-ops - keep `unproxyUrl` so URLs rewritten by older clients still confirm and delete - add a regression test that each adapter returns 404 without fetching Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport security fix for the 0.x line, to publish as
0.8.1under thelegacy-v0npm tag.Vulnerability
Every 0.x framework adapter registered
/proxy-filein every environment. It fetched any URL from theurlquery parameter with the visitor's cookies and served the response from the app's origin, with the upstreamContent-Type, and without authentication. A single crafted link likehttps://app.example/api/edgestore/proxy-file?url=https://attacker.examplecould:HttpOnlyandSameSite=Laxones) to the attackerOnly the React and backend clients used the route, to rewrite protected file URLs in development. 1.0.0 already removed it in 069563d.
Change
fetchProxyFile.disableDevProxy(React) andbaseUrl(backend client) as deprecated no-ops, so no build breaks in a patch.unproxyUrl, so URLs already rewritten by older clients still confirm and delete correctly./proxy-fileand never callsfetch. It fails on the 0.8.0 adapters and passes here.Compatibility: production behavior is unchanged apart from the route returning 404. The only breakage is in local development with
@edgestore/server@0.8.1and@edgestore/react@0.8.0: the old client still rewrites protected URLs to the removed route. The changeset says to upgrade both packages together.Release
0.xwas branched from@edgestore/server@0.8.0and carriesmain'srelease.yml(30b146e). After merge: run Release on0.xwithmaintenanceandlegacy-v0to open the version PR, merge it, then run it again to publish. The job checks thatlateststays on 1.x.Verification
pnpm build,pnpm typecheck,pnpm test(server 95, react 16, shared 5), lint and prettier all pass locally.🤖 Generated with Claude Code