[Bug] Query parameter rules drop equals signs from existing values

Open Beginner friendly
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start with the shared query parameter parser used by the HTTP Interceptor and reproduce the issue with a value such as token=abc==. Add regression coverage for both adding a parameter and removing an unrelated parameter, then verify that everything after the first equals sign is preserved in the rebuilt URL.

Written by the indexing model from the issue text.

Description

Is this about Requestly HTTP Interceptor?
  • Yes, this is about the HTTP Interceptor
What happened?

Query parameter rules lose equals signs that are part of an existing value.

For example, modifying https://example.com?token=abc==&remove=1 parses token as abc. Adding another parameter, or removing the unrelated remove parameter, then rebuilds the URL without the trailing equals signs.

I expected Requestly to split each query parameter on the first equals sign and preserve everything after it as the value.

Steps to reproduce

To reproduce while adding a parameter:

  1. Create a Query Param rule that adds added=2.
  2. Apply it to https://example.com?token=abc==&remove=1.
  3. The rebuilt URL loses the trailing equals signs from token.

To reproduce while removing a parameter:

  1. Create a Query Param rule that removes remove.
  2. Apply it to https://example.com?token=abc==&remove=1.
  3. The result should be https://example.com?token=abc==, but the trailing equals signs are dropped.
Where does the bug happen?
  • Browser extension (Chrome / Firefox / Edge / Safari)
  • Web app (app.requestly.com)
Browser (if extension)
  • Chrome
  • Firefox
  • Edge
  • Safari
Operating system (if desktop or relevant)

N/A

Version
  • Current master: 700da5b
  • Extension: 26.7.27
Which area?

rules (redirect, modify headers, replace, etc.)

Logs / screenshots / HAR

Not applicable. This happens in the shared query parameter parser.

Anything else?

A small fix and regression tests for both add and remove operations are ready.

Dominant language
TypeScript
Stars
87
Forks
23
Avg merge
14h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from requestly/interceptor

All issues in requestly/interceptor

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.