Skip to content

Fix From BCD scheme validation#2523

Open
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-from-bcd-empty-scheme
Open

Fix From BCD scheme validation#2523
marko1olo wants to merge 1 commit into
gchq:masterfrom
marko1olo:fix-from-bcd-empty-scheme

Conversation

@marko1olo

Copy link
Copy Markdown

Summary

  • Validate the From BCD encoding scheme before using the lookup table.
  • Convert invalid direct-link/API values such as From_BCD('', true, false, 'Nibbles') into a controlled operation error instead of an uncaught TypeError.
  • Add operation regression coverage for the empty scheme case.

Fixes #2489

Checks

  • node --no-warnings --no-deprecation --openssl-legacy-provider tests/operations/index.mjs
  • npx eslint src/core/operations/FromBCD.mjs tests/operations/tests/BCD.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(From BCD): Uncaught TypeError can'nt access property indexOf, n is undefined

3 participants