Skip to content

Fix Whirlpool variant validation#2521

Closed
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-whirlpool-empty-variant
Closed

Fix Whirlpool variant validation#2521
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-whirlpool-empty-variant

Conversation

@marko1olo

Copy link
Copy Markdown

Summary

  • Validate the Whirlpool variant before requesting a hasher from crypto-api.
  • Convert invalid direct-link/API values such as Whirlpool('', 10) into a controlled operation error instead of an uncaught backend TypeError.
  • Add operation regression coverage for the empty variant case.

Fixes #2507

Checks

  • node --no-warnings --no-deprecation --openssl-legacy-provider tests/operations/index.mjs
  • npx eslint src/core/operations/Whirlpool.mjs tests/operations/tests/Hash.mjs
  • npx grunt configTests
  • git diff --check

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

As we are unable to accept contributions unless the CLA has been signed, this PR will be automatically closed if the CLA is not signed within 21 days.

@GCHQDeveloper581

Copy link
Copy Markdown
Contributor

This was separately fixed by implementation of automatic option ingredient validation in #2625.

However thank you for contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(Whirlpool): If variant is empty will leads to an uncaught type error

3 participants