webpack: Drop obsolete md4 hash hack

webpack 5.54 solved this properly, bump the dependency.
This commit is contained in:
Martin Pitt 2021-12-14 09:13:48 +01:00 committed by Martin Pitt
parent db6397050a
commit 7e2f3d2b5c
2 changed files with 2 additions and 7 deletions

View file

@ -44,8 +44,8 @@
"stdio": "^2.1.0",
"string-replace-loader": "^3.0.0",
"terser-webpack-plugin": "^5.1.4",
"webpack": "^5.31.0",
"webpack-cli": "^4.6.0"
"webpack": "^5.54.0",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"@patternfly/patternfly": "4.159.1",

View file

@ -8,11 +8,6 @@ const CompressionPlugin = require("compression-webpack-plugin");
const ESLintPlugin = require('eslint-webpack-plugin');
const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin");
// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all over the place: https://github.com/webpack/webpack/issues/13572
const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
/* A standard nodejs and webpack pattern */
const production = process.env.NODE_ENV === 'production';