gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: Entering a negative amount for the ROT13 operation leads to an incorrect toast message

gregsadetsky opened this issue · comments

Describe the bug

When using the ROT13 operation, if you enter a negative "amount" (i.e. the amount that is 13 by default), an incorrect "toast" message appears at the bottom (see below for screenshot). An error also appears in the console: "Invalid ingredient value. Not a number: NaN"

To Reproduce

  1. go to https://gchq.github.io/CyberChef/#recipe=ROT13(true,true,false,-8)&input=VGhpcyBpcyBhIHRlc3Q
  2. in the "Amount" input in the ROT13 operation, delete the "8" and write "7" for example (making the amount -7)
  3. you will see an error in the console, and a toast message consisting of "[object Object]" will appear at the bottom

Expected behaviour

The expected behavior would be for no message to appear at the bottom, or for a human-readable one to appear.

Screenshots

image

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

  • OS: macOS 12.7
  • Browser: Desktop Chrome Version 119.0.6045.159 (Official Build) (arm64)
  • CyberChef version: Version 10.5.2

Additional context

n/a