fix: sichere Brotli-Laufzeit ab und erhöhe Patchversionen
All checks were successful
Deploy SingleChat / deploy (push) Successful in 31s
All checks were successful
Deploy SingleChat / deploy (push) Successful in 31s
This commit is contained in:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ypchat",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ypchat",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
"cookie-parser": "^1.4.6",
|
||||
@@ -19,6 +19,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^8.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ypchat",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"type": "module",
|
||||
"description": "YpChat Node.js/Vue Application",
|
||||
"scripts": {
|
||||
@@ -25,5 +25,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^8.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^22.23.4 || ^24.22.1 || ^26.12.1"
|
||||
}
|
||||
}
|
||||
|
||||
22
scripts/require-safe-node.cjs
Normal file
22
scripts/require-safe-node.cjs
Normal file
@@ -0,0 +1,22 @@
|
||||
// CVE-2026-111497: Node's bundled Brotli decoder must include the security fix.
|
||||
// Check Node versions: patched releases can still report Brotli 1.2.0.
|
||||
// https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
|
||||
'use strict';
|
||||
|
||||
function requireSafeNode() {
|
||||
const [major, minor, patch] = process.versions.node.split('.').map(Number);
|
||||
const minimum = { 22: [23, 4], 24: [22, 1], 26: [12, 1] }[major];
|
||||
const patched = minimum && (minor > minimum[0] ||
|
||||
(minor === minimum[0] && patch >= minimum[1]));
|
||||
|
||||
if (!patched) {
|
||||
throw new Error(
|
||||
`CVE-2026-111497: Node.js ${process.versions.node} is not an approved patched runtime. ` +
|
||||
'Use Node.js 22.23.4+, 24.22.1+ or 26.12.1+ within those release lines. ' +
|
||||
'Recommended: nvm install && nvm use (see .nvmrc). Restart all server/PM2 processes after upgrading.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
requireSafeNode();
|
||||
module.exports = requireSafeNode;
|
||||
@@ -1,3 +1,4 @@
|
||||
import '../scripts/require-safe-node.cjs';
|
||||
import express from 'express';
|
||||
import { createServer } from 'http';
|
||||
import { Server as SocketIOServer } from 'socket.io';
|
||||
|
||||
Reference in New Issue
Block a user