Skip to content

Fix Whirlpool variant validation#2521

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

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.

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