mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
Update webpack hash function for greater OSSL compat (#24584)
This commit is contained in:
parent
c463a50159
commit
d42799dc62
1 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,12 @@ const TerserPlugin = require("terser-webpack-plugin");
|
||||||
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
||||||
const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload");
|
const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload");
|
||||||
const SentryCliPlugin = require("@sentry/webpack-plugin");
|
const SentryCliPlugin = require("@sentry/webpack-plugin");
|
||||||
|
const crypto = require("crypto");
|
||||||
|
|
||||||
|
// XXX: mangle Crypto::createHash to replace md4 with sha256, output.hashFunction is insufficient as multiple bits
|
||||||
|
// of webpack hardcode md4. The proper fix it to upgrade to webpack 5.
|
||||||
|
const createHash = crypto.createHash;
|
||||||
|
crypto.createHash = (algorithm, options) => createHash(algorithm === "md4" ? "sha256" : algorithm, options);
|
||||||
|
|
||||||
// Environment variables
|
// Environment variables
|
||||||
// RIOT_OG_IMAGE_URL: specifies the URL to the image which should be used for the opengraph logo.
|
// RIOT_OG_IMAGE_URL: specifies the URL to the image which should be used for the opengraph logo.
|
||||||
|
|
Loading…
Reference in a new issue