github shakacode/react_on_rails v17.2.1.rc.2

pre-release4 hours ago

Fixed

  • Rspack server bundles no longer write a stray ssr-generated/manifest.json: The generated
    serverWebpackConfig.js removed client-only plugins by webpack class names only, so Rspack apps kept
    rspack-manifest-plugin and CssExtractRspackPlugin in the server compilation and in the RSC compilations
    derived from it. Each of those builds wrote its own ssr-generated/manifest.json, which ended up listing only
    the bundle that finished last. The generated config now removes both Rspack plugins. Existing Rspack apps can
    apply the same change to the plugin filter in config/rspack/serverWebpackConfig.js. Fixes
    #5184.
    #5185 by justin808.

  • [Pro] unstable_cache no longer crashes on RSC payload-endpoint requests: BUILD_ID was initialized only
    on page-render requests, so any /rsc_payload/* request (e.g. RSCRoute.refetch()) that landed on a renderer
    worker which had not yet served a full page render threw BUILD_ID not set. The RSC bundle hash is now published
    on both paths, and the renderer VM context carries the bundle identity as a structural fallback so future RSC
    entrypoints are safe by default. Fixes #5076.
    #5141,
    #5142 by
    AbanoubGhadban.

  • [Pro] Fix CSP nonce handling in fragment-cached components: The cached_* helpers now refresh executable inline script nonces on cache hits, preventing CSP from blocking hydration, console replay, and streaming scripts.
    Only nonces the framework emitted are refreshed. A cached render gives framework scripts a random placeholder nonce, and every response swaps it for its own nonce. App markup that carries the request's nonce, such as stored HTML injected while the nonce generator is session-derived, keeps its stale nonce for CSP to block on cache hits.
    Upgrade notes: App code that needs a nonce inside a cached component should read railsContext.cspNonce; a nonce passed in through props or Rails helpers is not refreshed. Overrides of these private Pro helpers must accept and forward their new parameters: normalize_cached_pro_attribution and normalize_cached_pro_attribution_html (cached_csp_nonce), append_cached_csp_nonce_marker (placeholder), consumer_stream_async (live_chunk_rewriter: keyword), and process_stream_chunks (live_chunk_rewriter); fetch_cache_entry now returns a fourth value. Framework emitters read the nonce through ReactOnRails::Helper#csp_nonce, which returns the placeholder during cached renders; code that overrides or stubs it should use the new request_csp_nonce for the request's own nonce. Component cache keys use a new csp-nonce-placeholder partition segment, so nonce-rendered entries written before upgrading are not reused. See CSP caching caveats for details.
    Fixes #5021 and #5267. #5025 by AbanoubGhadban and #5270 by justin808.

Security

  • [Pro] Doctor warns when the lockfile resolves a vulnerable react-server-dom-webpack: With RSC enabled,
    rake react_on_rails:doctor now reads every react-server-dom-webpack copy in yarn.lock, package-lock.json,
    pnpm-lock.yaml, or bun.lock, including copies installed through react-on-rails-rsc and npm aliases. It warns
    when a copy is affected by React's 2026-10-14 advisories (critical RCE
    GHSA-xqc2-xf4c-x3h3 and DoS
    GHSA-h3gv-c5rc-p453): any 19.0 through 19.3
    version below its line's patched release (19.0.9, 19.1.10, 19.2.9, 19.3.1), prereleases included. The fix updates
    react, react-dom, and react-server-dom-webpack together to 19.3.1 (19.2.9 on the 19.2 line) and commits the
    refreshed lockfile. Doctor also warns when no lockfile in the package root lists the package, or when a copy, such
    as an experimental build, falls outside the advisories' version rules.
    #5247 by justin808.

  • [Pro] The RSC generator declares React 19.3.1 as the floor: New RSC apps now install react and react-dom
    from ~19.3.1 instead of ~19.3.0, so they cannot resolve React 19.3.0. React's 2026-10-14 advisories (critical RCE
    GHSA-xqc2-xf4c-x3h3 and DoS
    GHSA-h3gv-c5rc-p453) affect
    react-server-dom-webpack 19.3.0, and the patched react-server-dom-webpack 19.3.1 peers on React 19.3.1.
    react-on-rails-rsc 19.3.1 still accepts React 19.3.0, so this floor is stricter than the package requires. When an
    existing app has React 19.3.0, the generator now warns and gives one command that upgrades react, react-dom, and
    react-server-dom-webpack together, so a retained lockfile cannot keep the vulnerable copy.
    #5252 by justin808.

  • [Pro] Doctor's react-server-dom-webpack check no longer skips pnpm tarball, git, or file: copies:
    pnpm-lock.yaml copies installed from a tarball URL, a git repository, or a local file, and pnpm 5 and 6 copies
    from a non-default registry, are now read too. Doctor warns that it cannot tell whether a non-registry copy includes the
    fixes, instead of reporting the lockfile as not affected.
    #5275 by justin808.

  • [Pro] The Node Renderer requires fastify 5.12.6 or later: The react-on-rails-pro-node-renderer package
    now depends on fastify ^5.12.6 instead of ^5.8.5, so an app upgrading with an existing lockfile cannot keep a
    fastify release affected by the 5.12.x security fixes, including authentication bypass through malformed URLs
    (GHSA-p68q-wchp-6fh7), request-validation bypasses
    (GHSA-hwr6-493r-vm6h), and a header-validation bypass fixed
    in 5.12.6 (GHSA-389g-gv7q-r4x8). Fresh 17.2.0 installs
    already pick up a fixed fastify. If your app pins a fastify 5 release below 5.12.6 through pnpm overrides,
    npm overrides, or Yarn resolutions, raise or remove that pin. Node 18.19 apps that use the documented Fastify 4
    override keep it, but no Fastify 4 release fixes the authentication and request-validation bypasses, so
    move to Node 20 or later to get the fixed Fastify 5.
    #5274 by justin808.

  • [Pro] Refresh react-server-dom-webpack for React's October 14 RSC advisories: React published
    GHSA-xqc2-xf4c-x3h3 (critical, remote
    code execution) and GHSA-h3gv-c5rc-p453
    (high, denial of service) against react-server-dom-webpack 19.0.0 through 19.3.0. React on Rails does not pin that
    package, so fresh installs already resolve a fixed version, but existing lockfiles keep the old one. Action
    required for upgraders:
    RSC apps should update react, react-dom, and react-server-dom-webpack together to
    19.3.1 (or all three to 19.2.9 on the 19.2 line) and commit the refreshed lockfile. If a copy nested under
    react-on-rails-rsc stays behind, pin it with npm overrides, pnpm pnpm.overrides, or Yarn resolutions. Check with
    pnpm why react-server-dom-webpack (or the npm or Yarn equivalent).
    #5276 by justin808.

Don't miss a new react_on_rails release

NewReleases is sending notifications on new releases.