gchq / gchq/CyberChef

Bug report: Expected behaviour for v10 non-printable character rendering copy/paste

Open
#1,600 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**
Might not be a bug per se, but interested in clarifying expected behaviour between v9 and v10. Specifically, when copying byte data into another application, default settings for v10 _appears_ to truncate data where as default settings for v9 appear to copy/paste more data.

This truncation appears when non-printable characters are rendered.

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

Generate Lorem Ipsum text
Compress this via ZIP to create non-text bytes including non-printable character rendering
Copy the data as 'raw bytes'
Paste the 'text' into HxD text input

**Expected behaviour**
v10 pastes very little text. (see below screenshot) where as v9 pastes more data. I'm not expecting all bytes to be pasted into HxD but the difference is large.

If you are copy/paste CyberChef output into another tool (VS Code, Sublime etc.) then the version 10 behaviour is not desirable.

**Screenshots**
v10.4.0 (left) with pasted output in HxD
![image](https://github.com/gchq/CyberChef/assets/39072319/6fd4d4c7-19e5-45ec-8173-dbbf42f8a083)

v9.55.0 with pasted output in HxD
![image](https://github.com/gchq/CyberChef/assets/39072319/6051c051-b6fb-4a94-a5ee-98497ffc3627)

**Desktop (if relevant, please complete the following information):**
* Version: 10.4.0
* Compile time: 24/03/2023 22:43:24 UTC
* User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
* [Link to reproduce](https://gchq.github.io/CyberChef/#recipe=Generate_Lorem_Ipsum(1,'Paragraphs')Zip('file.txt','','','Deflate','MSDOS','Dynamic%20Huffman%20Coding'))

* Version: 9.55.0
* Compile time: 09/12/2022 11:42:09 UTC
* User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
* [Link to reproduce](https://gchq.github.io/CyberChef/#recipe=Generate_Lorem_Ipsum(1,'Paragraphs')Zip('file.txt','','','Deflate','MSDOS','Dynamic%20Huffman%20Coding'))

**Additional context**
I kindly ask if this is expected behaviour, would you consider creating a option to toggle the non-printable character rendering. This could have additional benefits for readability of scripts and other data if the user was able to toggle the option.

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied CyberChef recipe links in v10.4.0 and v9.55.0, then compare their raw-byte copy/paste behavior for non-printable characters in HxD or another text editor. Done means establishing whether the version difference is expected and, if not, defining the intended rendering and copy behavior, including whether a toggle is needed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.