fix: help to handle @ when it is not encoded in url#7609
Merged
Conversation
jackkav
reviewed
Jun 28, 2024
| static parse(urlStr: string): UrlOptions | undefined { | ||
| // the URL API (for web) is not leveraged here because the input string could contain tags for interpolation | ||
| // which will be encoded, then it would introduce confusion for users in manipulation | ||
| // TODO: but it still would be better to rely on the URL API |
Contributor
There was a problem hiding this comment.
this is a good idea, perhaps try it here in the bugfix pr
Contributor
Author
There was a problem hiding this comment.
This is true, I tried several times so I added comment here :). As tags, path params could be in it, URL will reject most of test cases. Let's merge it and I'll show this in the next.
filfreire
approved these changes
Jun 28, 2024
stefancruz
pushed a commit
to stefancruz/insomnia
that referenced
this pull request
Jun 30, 2024
* fix: help to handle @ when it is not escaped in url * test: add tests and comments
CurryYangxx
pushed a commit
that referenced
this pull request
Jul 5, 2024
* fix: help to handle @ when it is not escaped in url * test: add tests and comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Normally
@is one URL separator and should be encoded if it used in path, but users normally don't aware of this, which will cause url parsing fail.Changes
Ref: INS-4083, #7603