gchq / gchq/CyberChef

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

Open
#1,659 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

**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

Contributor guide

Open the contributing guide

Research direction

Reproduce the provided CyberChef URL first, then trace the ROT13 Amount input and the toast shown for a negative value. The report names no files or tests; done means the negative input no longer emits "[object Object]" and either shows no toast or a human-readable message.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.