Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL in JSON response stops early if it contains a tilde (~) #4705

Closed
1 task done
SethFalco opened this issue Apr 18, 2022 · 0 comments · Fixed by #4710
Closed
1 task done

URL in JSON response stops early if it contains a tilde (~) #4705

SethFalco opened this issue Apr 18, 2022 · 0 comments · Fixed by #4710
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@SethFalco
Copy link
Contributor

Expected Behavior

For example, if the response is:

{
  "highdpi": {
    "double": "https://cdn.example.org/images/?Signature=jPI4vsvTXQbf4~ym1gFMLHkHV3vW7kSPuMK0zyeSmRt4u0VOj4~6k~jc3zBevf9801xmwMa7o5AA"
  }
}

The user should be able to click the link and be taken to:
https://cdn.example.org/images/?Signature=jPI4vsvTXQbf4~ym1gFMLHkHV3vW7kSPuMK0zyeSmRt4u0VOj4~6k~jc3zBevf9801xmwMa7o5AA

Actual Behavior

Only https://cdn.example.org/images/?Signature=jPI4vsvTXQbf4 will be underlined and open in the browser if clicked. (Resulting in the user going to the wrong page.)

Reproduction Steps

Send a request to a URL that will return a JSON response with a URL in it, which contains a tilde. (~)

For example:

GET /SethFalco/4300f1a75c3e7d5dab4ca90656a362ae/raw/da9461934a7e53a3ac15e6b03a67a573a14092d4/boop.json HTTP/1.1
Host: gist.githubusercontent.com

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2022.2.1

What operating system are you using?

Other Linux

Operating System Version

Linux seth-pc-tux 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux

Installation method

Snap

Last Known Working Insomnia version

No response

@SethFalco SethFalco added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Apr 18, 2022
daniel-stoneuk added a commit to daniel-stoneuk/insomnia that referenced this issue Apr 19, 2022
Added the unreserved character ~ and the reserved characters '(), to the URL matching regex since these can appear without being URL encoded.

This should fix Kong#4705 and improve detection of URLs.
daniel-stoneuk added a commit to daniel-stoneuk/insomnia that referenced this issue Apr 19, 2022
Added the unreserved character ~ and the reserved characters '(), to the URL matching regex since these can appear without being URL encoded.

This should fix Kong#4705 and improve detection of URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant