Kong / Kong/insomnia

Base64 Encode variable is failing when file includes percentile symbol

Open
#3,815 2 comments 0 reactions 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

**Describe the bug**
When I enter a data file in either XML or JSON format into a base64-->Encode variable, the encoding appears to fail when the file contains a percentage symbol.

**Expected behavior**
I expect it should base64 encode the file.

**Screenshots**

File contains percentage symbol.

![image](https://user-images.githubusercontent.com/87450277/125697606-14423a22-9aa3-4d04-9073-dd87dcd55174.png)

Insomnia contains the Base64-->Encode variable.

![image](https://user-images.githubusercontent.com/87450277/125697845-65aac3d2-0cdc-4567-a742-d5ed43ac7ea4.png)

Entering JSON data file into variable.

![image](https://user-images.githubusercontent.com/87450277/125697931-f46849ca-a434-491f-b121-737d2b07fb67.png)

Base64 encoding has failed.

![image](https://user-images.githubusercontent.com/87450277/125697977-e3ec3d48-d783-48a6-ab0e-8152d8344706.png)

**Desktop (please complete the following information):**
- OS: Windows 10
- Installation Method: company installed
- App Version 2021.4.0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start at the Base64 → Encode variable entry point and reproduce the failure with XML and JSON files containing a percentage symbol. Trace how the variable reads file content, then add a regression test covering that input and verify the file is base64 encoded successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.