Skip to content

test: cover server-function CSRF integration - #322

Merged
ryansolid merged 1 commit into
nextfrom
server-function-csrf
Aug 25, 2026
Merged

test: cover server-function CSRF integration#322
ryansolid merged 1 commit into
nextfrom
server-function-csrf

Conversation

@birkskyum

Copy link
Copy Markdown
Member

Summary

  • document Solid Web’s default same-origin protection for server functions
  • make the Start SSR Node harness send browser-style Sec-Fetch-Site metadata
  • verify cross-site rejection and same-origin dispatch in development and production

Prerequisite

Depends on solid#3027, which adopts the runtime protection from dom-expressions#571.

This stays draft until the corresponding @solidjs/web release is available. There is no plugin changeset because the policy and runtime behavior live in Solid Web. This PR documents and verifies the existing Vite integration.

Testing

Tested against a simulated @solidjs/web@2.0.0-rc.2 built from solid#3027:

  • pnpm build
  • Start SSR development mode: 65/65 assertions
  • Start SSR production mode: 58/58 assertions

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b16ddfe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/vite-plugin@322

commit: b16ddfe

@ryansolid
ryansolid marked this pull request as ready for review August 25, 2026 05:00
@ryansolid
ryansolid merged commit b16a007 into next Aug 25, 2026
6 checks passed
ryansolid added a commit that referenced this pull request Aug 25, 2026
The Release e2e compiles serverComponents fixtures against published
@solidjs/web; rc.1 predated the ssrClaim surface so the suite failed on
import and the version PR never cut. Bump the workspace catalog and pins
to rc.2, and extend #322's browser-metadata contract to the two synthetic
dispatch paths it missed (host-dispatch.mjs, external mode) — the
runtime's same-origin protection rejects server-function requests without
Sec-Fetch-Site/Origin. 366/366 assertions pass locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants