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
- go to https://gchq.github.io/CyberChef/#recipe=ROT13(true,true,false,-8)&input=VGhpcyBpcyBhIHRlc3Q
- in the "Amount" input in the ROT13 operation, delete the "8" and write "7" for example (making the amount -7)
- 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](https://private-user-images.githubusercontent.com/1017304/286429767-2910f361-81c3-43a1-b91b-9c1895fcf4ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA2MjYxMTYsIm5iZiI6MTcxMDYyNTgxNiwicGF0aCI6Ii8xMDE3MzA0LzI4NjQyOTc2Ny0yOTEwZjM2MS04MWMzLTQzYTEtYjkxYi05YzE4OTVmY2Y0ZmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDMxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAzMTZUMjE1MDE2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWQzNmNiOTUyODE1YzVjMGZmMDAzY2ViNTFiMmNlNTZhMWM3YWI1ZGViYTM1YWFmN2Y2MmNmMGJjMDNlMGVkNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.pVEPoMCm9Y54HyrgJaK1ukzvw_lOsVpznW0He7II63s)
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