Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use md5 hash for caching on node v17 #918

Merged
merged 3 commits into from
Oct 20, 2021
Merged

Conversation

Reptarsrage
Copy link
Contributor

@Reptarsrage Reptarsrage commented Oct 20, 2021

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
#917

What is the new behavior?
Webpack builds will succeed with latest node version 17.0.0 if you set the new "hashType" configuration value to "md5".

Does this PR introduce a breaking change?

  • Yes
  • No

@Reptarsrage
Copy link
Contributor Author

Reptarsrage commented Oct 20, 2021

Looks like "md4" is now considered "legacy" in OpenSSL 3.0 and is not supported without some tweaking (source, source). This change allows users to specify a supported hash algorithm.

@Reptarsrage Reptarsrage changed the title Fixing outdated "md4" hash algorithm Adding new configuration value to work around outdated "md4" hash algorithm in node v17 Oct 20, 2021
@nicolo-ribaudo
Copy link
Member

Would it be a breaking change to just switch to md5 by default?

@JLHwung
Copy link
Contributor

JLHwung commented Oct 20, 2021

Would it be a breaking change to just switch to md5 by default?

Changing hash algorithm will invalidate current cache. I think offering a hashType is overkill, we can use md5 on Node >= 17 and migrate to md5 in next major.

@Reptarsrage
Copy link
Contributor Author

@JLHwung I switched the change to conditionally switch to md5 if it detects node v17.0.0 or higher.

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo nicolo-ribaudo changed the title Adding new configuration value to work around outdated "md4" hash algorithm in node v17 Use md5 has for caching on node v17 Oct 20, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit 0093525 into babel:main Oct 20, 2021
@JLHwung JLHwung changed the title Use md5 has for caching on node v17 Use md5 hash for caching on node v17 Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants