Bug report: Pad Lines outputs [object Object] with empty length field
- 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
Assessment
This issue has not been assessed yet.