From fd8f889cde5f905b76016d93eee90e9cab47c797 Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Fri, 4 Sep 2026 23:00:39 +0000 Subject: [PATCH] fix: hash the manifest version with sha256 for FIPS hosts md5 is unavailable when Node runs on a FIPS-enabled machine, so the manifest version digest threw during builds there. sha256 is FIPS-approved and the version only needs to be a short, stable content digest. Fixes #124 Co-Authored-By: Claude Fable 5.1 --- .changeset/fips-safe-manifest-hash.md | 8 ++++++++ src/manifest.ts | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/fips-safe-manifest-hash.md diff --git a/.changeset/fips-safe-manifest-hash.md b/.changeset/fips-safe-manifest-hash.md new file mode 100644 index 00000000..53e55a66 --- /dev/null +++ b/.changeset/fips-safe-manifest-hash.md @@ -0,0 +1,8 @@ +--- +'rsbuild-plugin-react-router': patch +--- + +Hash the browser manifest version with sha256 instead of md5, which is +unavailable on FIPS-enabled machines and made builds fail there. The version +is a short content digest, so existing deployments only see the manifest file +name change once. diff --git a/src/manifest.ts b/src/manifest.ts index 654b5811..4e2cd341 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -609,7 +609,8 @@ function generateReactRouterManifestForDevEffect( // compares the browser's manifest version with the pinned server build's, // and a random per-compilation version made unchanged manifests differ // whenever a web compilation completed without a new server pin. - const version = createHash('md5') + // sha256 rather than md5: md5 is unavailable on FIPS-enabled hosts (#124). + const version = createHash('sha256') .update(JSON.stringify(fingerprintedValues)) .digest('hex') .slice(0, 8);