gchq / gchq/CyberChef

Bug report: Pad Lines outputs [object Object] with empty length field

Open
#1,997 0 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**
Pad Lines operation with empty Length field outputs `[object Object]`

**To Reproduce**
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

- Use "Pad Lines" operation
- Set Length field to be empty

https://gchq.github.io/CyberChef/#recipe=Pad_lines('Start',null,'test%20')&input=aGk

**Expected behaviour**
Either output an actual error if length is not set, or use some sensible default behavior.
In my opinion, a useful default behavior would be to assume Length to be the length of the "Character" textbox input. This way, if you want to pad a line with some string, you don't have to manually compute the string length to use Pad Lines

**Desktop (if relevant, please complete the following information):**
- Browser: Chrome 134
- CyberChef version: 10.19.4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.