diff --git a/CHANGELOG.md b/CHANGELOG.md index e99a017f1..82baf0da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Release v1.7.5 + + + ## Release v1.7.4 diff --git a/cass-editor b/cass-editor index b7b80d2c3..cd5b4f057 160000 --- a/cass-editor +++ b/cass-editor @@ -1 +1 @@ -Subproject commit b7b80d2c3b9b04fddff36b9ef46e1edb4e999ca4 +Subproject commit cd5b4f05736c0d38a307a4211546b0fbbc002d6f diff --git a/docker-compose-test.yml b/docker-compose-test.yml index 36ec2430a..90f3459e1 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -1,7 +1,7 @@ version: '3' services: elasticsearch-cass: - image: docker.elastic.co/elasticsearch/elasticsearch:9.4.2 + image: docker.elastic.co/elasticsearch/elasticsearch:9.4.5 container_name: elasticsearch-cass networks: - testnet diff --git a/docker-compose.yml b/docker-compose.yml index 272d68d28..254229b52 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ services: depends_on: - elasticsearch-cass elasticsearch-cass: - image: docker.elastic.co/elasticsearch/elasticsearch:9.4.2 + image: docker.elastic.co/elasticsearch/elasticsearch:9.4.5 container_name: elasticsearch-cass networks: - esnet diff --git a/docker/standalone/Dockerfile b/docker/standalone/Dockerfile index 7c6147dbb..8c1910120 100644 --- a/docker/standalone/Dockerfile +++ b/docker/standalone/Dockerfile @@ -10,7 +10,7 @@ # RPM on purpose: the RPM declares a dependency on python3, which drags Python # and its transitive libraries into the image (the single largest cluster of OS # CVEs here) even though CaSS has no native modules and never needs node-gyp. -FROM docker.elastic.co/elasticsearch/elasticsearch:9.5.0 AS build-deps +FROM docker.elastic.co/elasticsearch/elasticsearch:9.4.5 AS build-deps USER root RUN microdnf install -y --nodocs gcc make perl-core zlib-devel tar xz diffutils && microdnf clean all RUN cd /usr/local/src && curl -fsSLO https://www.openssl.org/source/openssl-3.1.2.tar.gz && tar xf openssl-3.1.2.tar.gz && cd openssl-3.1.2 && ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib enable-fips && make -j8 > make.log && make install > makeinstall.log && make install_ssldirs > makeinstallssldirs.log && make install_fips > makeinstallfips.log @@ -30,7 +30,7 @@ RUN case "$TARGETARCH" in \ && tar -xJf "node-${NODE_VERSION}-linux-${NARCH}.tar.xz" -C /opt/node --strip-components=1 \ && rm -f node-*.tar.xz SHASUMS256.txt -FROM docker.elastic.co/elasticsearch/elasticsearch:9.5.0 +FROM docker.elastic.co/elasticsearch/elasticsearch:9.4.5 USER root # Apply base-image security updates before the package manager is removed below. diff --git a/package-lock.json b/package-lock.json index c3ce42c32..50db5c6a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cass", - "version": "1.7.4", + "version": "1.7.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cass", - "version": "1.7.4", + "version": "1.7.5", "license": "Apache-2.0", "dependencies": { "@aws-sdk/client-s3": "^3.1108.0", diff --git a/package.json b/package.json index 412adc262..c00708c13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cass", - "version": "1.7.4", + "version": "1.7.5", "description": "Competency and Skills System", "main": "src/main/server.js", "scripts": { diff --git a/src/main/server.js b/src/main/server.js index bc7f2c473..2d3a46dc6 100644 --- a/src/main/server.js +++ b/src/main/server.js @@ -40,9 +40,6 @@ global.fetch = async function (url, options) { return originalFetch(url, options); } -// Undici 8.x's fetch doesn't recognize native FormData. Must load before cassproject. -require('./server/shims/undici-compat'); - let startupDt = new Date(); global.auditLogger = require('./server/shims/auditLogger.js'); const express = require('express'); diff --git a/src/main/server/profile/worker.js b/src/main/server/profile/worker.js index 665124cce..f3ceeb712 100644 --- a/src/main/server/profile/worker.js +++ b/src/main/server/profile/worker.js @@ -40,8 +40,6 @@ const https = require('https'); let app; -// Undici 8.x's fetch doesn't recognize native FormData. Must load before cassproject. -require('../shims/undici-compat'); require("cassproject"); const hashModuleRoot = require("node-object-hash"); diff --git a/src/main/server/shims/undici-compat.js b/src/main/server/shims/undici-compat.js deleted file mode 100644 index b34068df7..000000000 --- a/src/main/server/shims/undici-compat.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Undici 8.x compatibility shim. - * - * cassproject's EcRemote destructures {fetch} from the `undici` npm package, - * while EcRepository builds request bodies with the *global* FormData (it only - * swaps in undici's FormData on Node 16). Undici 8.x's fetch does not - * recognize Node's native FormData: instead of encoding multipart/form-data it - * stringifies the body and sends Content-Type: text/plain;charset=UTF-8, which - * the server then rejects with "Unsupported content type" from busboy. - * - * This shim intercepts require('undici') and returns a Proxy that: - * - Replaces undici.fetch → globalThis.fetch (native or allow-list wrapper) - * - Replaces undici.FormData → globalThis.FormData (native) - * - Passes through everything else (setGlobalDispatcher, Agent, etc.) - * - * so that both halves of the pair come from the same implementation. - * - * If undici is not installed at all, require('undici') is satisfied with a - * minimal native-backed stand-in rather than throwing, so callers that treat - * undici as optional keep working. If the runtime has no global fetch either - * (Node < 18), the shim stays out of the way entirely and the original - * behaviour — including the original error — is preserved. - * - * Must be loaded BEFORE cassproject is required, and AFTER any globalThis.fetch - * wrappers (e.g. the fetch allow-list in server.js) are installed. Loading it - * more than once is harmless. - */ -'use strict'; - -const Module = require('module'); - -// Guard against double-patching if this shim is required from several entry -// points (server.js, the profile worker, tests, scripts). -if (!Module.prototype.require.__undiciCompatPatched) { - const origRequire = Module.prototype.require; - - const patchedRequire = function patchedRequire(id) { - if (id !== 'undici') { - return origRequire.apply(this, arguments); - } - - let real = null; - let loadError = null; - try { - real = origRequire.apply(this, arguments); - } catch (e) { - loadError = e; - } - - // No global fetch to substitute (Node < 18): leave everything as-is. - if (typeof globalThis.fetch !== 'function') { - if (loadError) throw loadError; - return real; - } - - if (real) { - return new Proxy(real, { - get(target, prop) { - if (prop === 'fetch') return globalThis.fetch; - if (prop === 'FormData') return globalThis.FormData; - return target[prop]; - } - }); - } - - // undici is not installed — hand back a native-backed stand-in so - // optional consumers (cassproject) can still initialize. - return { - fetch: globalThis.fetch, - FormData: globalThis.FormData, - Headers: globalThis.Headers, - Request: globalThis.Request, - Response: globalThis.Response, - setGlobalDispatcher: function () { /* no dispatcher to configure */ }, - getGlobalDispatcher: function () { return null; }, - Agent: function Agent() { /* inert stand-in */ }, - }; - }; - - patchedRequire.__undiciCompatPatched = true; - Module.prototype.require = patchedRequire; -} diff --git a/src/main/swagger.json b/src/main/swagger.json index 1c5a9ff83..ff0854343 100644 --- a/src/main/swagger.json +++ b/src/main/swagger.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "CaSS", - "version": "1.7.4" + "version": "1.7.5" }, "security": [ {