|
| 1 | +diff --git a/node_modules/webpack/lib/Compilation.js b/node_modules/webpack/lib/Compilation.js |
| 2 | +index 6329174..196c4bb 100644 |
| 3 | +--- a/node_modules/webpack/lib/Compilation.js |
| 4 | ++++ b/node_modules/webpack/lib/Compilation.js |
| 5 | +@@ -1915,7 +1915,7 @@ class Compilation extends Tapable { |
| 6 | + const hashFunction = outputOptions.hashFunction; |
| 7 | + const hashDigest = outputOptions.hashDigest; |
| 8 | + const hashDigestLength = outputOptions.hashDigestLength; |
| 9 | +- const hash = createHash(hashFunction); |
| 10 | ++ const hash = createHash('sha512'); |
| 11 | + if (outputOptions.hashSalt) { |
| 12 | + hash.update(outputOptions.hashSalt); |
| 13 | + } |
| 14 | +@@ -1936,7 +1936,7 @@ class Compilation extends Tapable { |
| 15 | + const modules = this.modules; |
| 16 | + for (let i = 0; i < modules.length; i++) { |
| 17 | + const module = modules[i]; |
| 18 | +- const moduleHash = createHash(hashFunction); |
| 19 | ++ const moduleHash = createHash('sha512'); |
| 20 | + module.updateHash(moduleHash); |
| 21 | + module.hash = /** @type {string} */ (moduleHash.digest(hashDigest)); |
| 22 | + module.renderedHash = module.hash.substr(0, hashDigestLength); |
| 23 | +@@ -1957,7 +1957,7 @@ class Compilation extends Tapable { |
| 24 | + }); |
| 25 | + for (let i = 0; i < chunks.length; i++) { |
| 26 | + const chunk = chunks[i]; |
| 27 | +- const chunkHash = createHash(hashFunction); |
| 28 | ++ const chunkHash = createHash('sha512'); |
| 29 | + try { |
| 30 | + if (outputOptions.hashSalt) { |
| 31 | + chunkHash.update(outputOptions.hashSalt); |
| 32 | +@@ -1994,7 +1994,7 @@ class Compilation extends Tapable { |
| 33 | + const hashFunction = outputOptions.hashFunction; |
| 34 | + const hashDigest = outputOptions.hashDigest; |
| 35 | + const hashDigestLength = outputOptions.hashDigestLength; |
| 36 | +- const hash = createHash(hashFunction); |
| 37 | ++ const hash = createHash('sha512'); |
| 38 | + hash.update(this.fullHash); |
| 39 | + hash.update(update); |
| 40 | + this.fullHash = /** @type {string} */ (hash.digest(hashDigest)); |
| 41 | +diff --git a/node_modules/webpack/lib/HashedModuleIdsPlugin.js b/node_modules/webpack/lib/HashedModuleIdsPlugin.js |
| 42 | +index 7a860f7..2e0d9c6 100644 |
| 43 | +--- a/node_modules/webpack/lib/HashedModuleIdsPlugin.js |
| 44 | ++++ b/node_modules/webpack/lib/HashedModuleIdsPlugin.js |
| 45 | +@@ -43,7 +43,7 @@ class HashedModuleIdsPlugin { |
| 46 | + const id = module.libIdent({ |
| 47 | + context: this.options.context || compiler.options.context |
| 48 | + }); |
| 49 | +- const hash = createHash(options.hashFunction); |
| 50 | ++ const hash = createHash('sha512'); |
| 51 | + hash.update(id); |
| 52 | + const hashId = /** @type {string} */ (hash.digest( |
| 53 | + options.hashDigest |
| 54 | +diff --git a/node_modules/webpack/lib/JavascriptModulesPlugin.js b/node_modules/webpack/lib/JavascriptModulesPlugin.js |
| 55 | +index 2c1bbe4..61fe7bd 100644 |
| 56 | +--- a/node_modules/webpack/lib/JavascriptModulesPlugin.js |
| 57 | ++++ b/node_modules/webpack/lib/JavascriptModulesPlugin.js |
| 58 | +@@ -130,7 +130,7 @@ class JavascriptModulesPlugin { |
| 59 | + hashDigestLength, |
| 60 | + hashFunction |
| 61 | + } = outputOptions; |
| 62 | +- const hash = createHash(hashFunction); |
| 63 | ++ const hash = createHash('sha512'); |
| 64 | + if (hashSalt) hash.update(hashSalt); |
| 65 | + const template = chunk.hasRuntime() |
| 66 | + ? compilation.mainTemplate |
| 67 | +diff --git a/node_modules/webpack/lib/ModuleFilenameHelpers.js b/node_modules/webpack/lib/ModuleFilenameHelpers.js |
| 68 | +index bd0742b..9ad4687 100644 |
| 69 | +--- a/node_modules/webpack/lib/ModuleFilenameHelpers.js |
| 70 | ++++ b/node_modules/webpack/lib/ModuleFilenameHelpers.js |
| 71 | +@@ -42,7 +42,7 @@ const getBefore = (str, token) => { |
| 72 | + }; |
| 73 | + |
| 74 | + const getHash = str => { |
| 75 | +- const hash = createHash("md4"); |
| 76 | ++ const hash = createHash("sha512"); |
| 77 | + hash.update(str); |
| 78 | + const digest = /** @type {string} */ (hash.digest("hex")); |
| 79 | + return digest.substr(0, 4); |
| 80 | +diff --git a/node_modules/webpack/lib/NamedModulesPlugin.js b/node_modules/webpack/lib/NamedModulesPlugin.js |
| 81 | +index 2d84aaf..102b244 100644 |
| 82 | +--- a/node_modules/webpack/lib/NamedModulesPlugin.js |
| 83 | ++++ b/node_modules/webpack/lib/NamedModulesPlugin.js |
| 84 | +@@ -8,7 +8,7 @@ const createHash = require("./util/createHash"); |
| 85 | + const RequestShortener = require("./RequestShortener"); |
| 86 | + |
| 87 | + const getHash = str => { |
| 88 | +- const hash = createHash("md4"); |
| 89 | ++ const hash = createHash("sha512"); |
| 90 | + hash.update(str); |
| 91 | + const digest = /** @type {string} */ (hash.digest("hex")); |
| 92 | + return digest.substr(0, 4); |
| 93 | +diff --git a/node_modules/webpack/lib/NormalModule.js b/node_modules/webpack/lib/NormalModule.js |
| 94 | +index 76aa1bd..a952cc2 100644 |
| 95 | +--- a/node_modules/webpack/lib/NormalModule.js |
| 96 | ++++ b/node_modules/webpack/lib/NormalModule.js |
| 97 | +@@ -414,7 +414,7 @@ class NormalModule extends Module { |
| 98 | + } |
| 99 | + |
| 100 | + _initBuildHash(compilation) { |
| 101 | +- const hash = createHash(compilation.outputOptions.hashFunction); |
| 102 | ++ const hash = createHash('sha512'); |
| 103 | + if (this._source) { |
| 104 | + hash.update("source"); |
| 105 | + this._source.updateHash(hash); |
| 106 | +diff --git a/node_modules/webpack/lib/SourceMapDevToolPlugin.js b/node_modules/webpack/lib/SourceMapDevToolPlugin.js |
| 107 | +index 3018eb2..cb714bd 100644 |
| 108 | +--- a/node_modules/webpack/lib/SourceMapDevToolPlugin.js |
| 109 | ++++ b/node_modules/webpack/lib/SourceMapDevToolPlugin.js |
| 110 | +@@ -346,7 +346,7 @@ class SourceMapDevToolPlugin { |
| 111 | + : filename, |
| 112 | + query, |
| 113 | + basename: basename(filename), |
| 114 | +- contentHash: createHash("md4") |
| 115 | ++ contentHash: createHash("sha512") |
| 116 | + .update(sourceMapString) |
| 117 | + .digest("hex") |
| 118 | + }; |
| 119 | +diff --git a/node_modules/webpack/lib/optimize/ConcatenatedModule.js b/node_modules/webpack/lib/optimize/ConcatenatedModule.js |
| 120 | +index df4d216..ea8cecb 100644 |
| 121 | +--- a/node_modules/webpack/lib/optimize/ConcatenatedModule.js |
| 122 | ++++ b/node_modules/webpack/lib/optimize/ConcatenatedModule.js |
| 123 | +@@ -560,7 +560,7 @@ class ConcatenatedModule extends Module { |
| 124 | + orderedConcatenationListIdentifiers += " "; |
| 125 | + } |
| 126 | + } |
| 127 | +- const hash = createHash("md4"); |
| 128 | ++ const hash = createHash("sha512"); |
| 129 | + hash.update(orderedConcatenationListIdentifiers); |
| 130 | + return this.rootModule.identifier() + " " + hash.digest("hex"); |
| 131 | + } |
| 132 | +diff --git a/node_modules/webpack/lib/optimize/SplitChunksPlugin.js b/node_modules/webpack/lib/optimize/SplitChunksPlugin.js |
| 133 | +index e7d560b..8243e8c 100644 |
| 134 | +--- a/node_modules/webpack/lib/optimize/SplitChunksPlugin.js |
| 135 | ++++ b/node_modules/webpack/lib/optimize/SplitChunksPlugin.js |
| 136 | +@@ -22,7 +22,7 @@ const deterministicGroupingForModules = /** @type {function(DeterministicGroupin |
| 137 | + |
| 138 | + const hashFilename = name => { |
| 139 | + return crypto |
| 140 | +- .createHash("md4") |
| 141 | ++ .createHash("sha512") |
| 142 | + .update(name) |
| 143 | + .digest("hex") |
| 144 | + .slice(0, 8); |
0 commit comments