webpack: Replace md4 hash with 256-bit sha2.#13021
Merged
Conversation
petemill
approved these changes
Apr 15, 2022
petemill
reviewed
Apr 15, 2022
|
|
||
| const tsConfigPath = path.join(process.env.ROOT_GEN_DIR, 'tsconfig-webpack.json') | ||
|
|
||
| // OpenSSL 3 no longer supports the insecure md4 hash, but webpack < 6 |
Member
There was a problem hiding this comment.
Actually I think that PR fix landed on webpack 5.54.0
Contributor
Author
There was a problem hiding this comment.
I see a futureDefaults flag that selects xxhash64 instead, but I don't think we set that? The linked issue says the don't intend to change the default because it breaks reproducibility.
OpenSSL 3.x removed the md4 hash, which is hardcoded by webpack versions prior to 6. This breaks the build on systems providing the current OpenSSL release, such as Ubuntu 22.04 or Fedora 36. Work around by monkey-patching the crypto module to use the sha256 hash instead in our webpack invocations. See webpack/webpack#13572 Resolves brave/brave-browser#22305
Contributor
Author
|
Rebased to re-trigger ci. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenSSL 3.x removed the md4 hash, which is hardcoded by webpack
versions prior to 6. This breaks the build on systems providing
the current OpenSSL release, such as Ubuntu 22.04 or Fedora 36.
Work around by monkey-patching the crypto module to use the sha256
hash instead in our webpack invocations.
See webpack/webpack#13572
Resolves brave/brave-browser#22305
Submitter Checklist:
QA/YesorQA/No;release-notes/includeorrelease-notes/exclude;OS/...) to the associated issuenpm run test -- brave_browser_tests,npm run test -- brave_unit_tests,npm run lint,npm run gn_check,npm run tslintgit rebase master(if needed)Reviewer Checklist:
gnAfter-merge Checklist:
changes has landed on
Test Plan: