Cyberchef: Bug report: Missing validation in "From Binary" option

Created on 22 Feb 2021  路  1Comment  路  Source: gchq/CyberChef

Describe the bug
Negative byte length in "From Binary" operation

To Reproduce
Steps to reproduce:

  1. Go to 'From Binary'
  2. Enter some binary text
  3. Set byte length to a negative value
  4. Wait
  5. See error

Expected behaviour
Problem in the src/core/lib/Binary.mjs. Loop iterator goes to wrong value, that causes wrong substring extraction

Screenshots
image

image

Desktop (if relevant, please complete the following information):

  • OS: Windows
  • Browser: Edge 88.0.705.74
  • CyberChef version: 9.27.3
bug

Most helpful comment

Thanks for raising this. I've fixed it both by preventing the user from entering a value lower than 1, and by adding a check in the function that throws an exception if the value is invalid. I also found a couple of other places that had the same issue so I've fixed them as well.

>All comments

Thanks for raising this. I've fixed it both by preventing the user from entering a value lower than 1, and by adding a check in the function that throws an exception if the value is invalid. I also found a couple of other places that had the same issue so I've fixed them as well.

Was this page helpful?
0 / 5 - 0 ratings