gchq / gchq/CyberChef

Bug report: URL Decode function not properly decoding URLs

Open
#1,577 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:**
The "URL Decode" operation in CyberChef is not properly decoding certain URL-encoded strings.

**To Reproduce:**
1. Go to CyberChef (https://gchq.github.io/CyberChef/)
2. Enter the following URL-encoded string in the input box: https://fa.wikipedia.org/wiki/%D8%B7%D8%B1%D8%AD%E2%80%8C%D9%88%D8%A7%D8%B1%D9%87_%D8%AF%D8%B1%D9%85%D8%A7%D9%86%DB%8C
3. Add the "URL Decode" operation to the recipe
4. Run the recipe
5. The output will be incorrect

**Expected behavior:**
The "URL Decode" operation should properly decode the input URL-encoded string to the correct URL.
The output should be:
https://fa.wikipedia.org/wiki/طرح‌واره_درمانی

However, the output I am getting is:
https://fa.wikipedia.org/wiki/طرح‌واره_درمانی

**Screenshots**
![CyberChef](https://github.com/gchq/CyberChef/assets/50226354/f642a31e-9af8-4351-a441-0bc3615dcfdd)

**Additional context**
The issue is not specific to a particular input string and occurs consistently in the current version of CyberChef. It's important to note that copying the decoded output using the "Copy" button works correctly.

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.