Monkey patch createHash function as workaround for hardcoded md4 hash
This patch modifies createHash at runtime to workaround hardcoded hashing algorithms (md4) in various Javascript modules that are no longer supported by default in OpenSSL included in Ubuntu 24.04 and possibly other operating systems. Allows for successful "yarn run build". Change-Id: I91a7ccb0a106256a0cbd40291b486c05502d9e05
This commit is contained in:
@@ -22,6 +22,11 @@ const { getGlobalVariables, getCustomStyleVariables } = require('./utils');
|
||||
const root = (path) => resolve(__dirname, `../${path}`);
|
||||
const version = moment().unix();
|
||||
|
||||
// (jamesdenton) Remove once libs no longer hardcode the hashing algorithm
|
||||
const crypto = require("crypto");
|
||||
const crypto_orig_createHash = crypto.createHash;
|
||||
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "md5" : algorithm);
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
|
Reference in New Issue
Block a user