mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #2829] [bug]: query parameters are escaped implicitly #911
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#911
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liudonghua123 on GitHub (Oct 27, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2829
Originally assigned to: @maneeshms on GitHub.
Is there an existing issue for this?
Current behavior
When I send a
Getrequest with the following parameters(in bulk edit).The actual request sent is
url?token=token_part1+token_part2&attrs=password%253Dabcwhich is wrong for my server.If I send the same
Getrequest using postman, the actual request sent isurl?token=token_part1%20token_part2&attrs=password%3Dabcwhich is correct for my server.I found the problem code is around the following code.
github.com/hoppscotch/hoppscotch@dc80cc80e6/packages/hoppscotch-app/src/helpers/strategies/ExtensionStrategy.ts (L64-L70)See also https://developer.mozilla.org/en-US/docs/Web/API/URL/toString, https://javascript.info/url, https://url.spec.whatwg.org/#URL-stringification-behavior.
Steps to reproduce
Parameterstab, clickBulk edit.Sendbutton to make the request.Environment
Release
Version
Cloud
@liudonghua123 commented on GitHub (Oct 27, 2022):
If I send the request with the following parameters.
Then the request is ok. It seems the space in url query string can be
encode/escapeas+or%20. Both of them work.So maybe the request works in postman is because it checks whether some spaces are in the parameters or not,
encodeURIComponentis called if some spaces are included. It will NOTencode/escapethe parameters.A config setting toggles the
encode/escapefunctionality would be nice for test purposes.@liudonghua123 commented on GitHub (Oct 27, 2022):
https://www.fullhost.com/blog/what-does-20-mean-in-a-web-address/
@AndrewBastin commented on GitHub (Oct 27, 2022):
Since the current implementation is correct according to the spec, we are prioritizing this as a low priority issue.
PR contributions for implementing the toggle for considering both ways are welcome in the meantime :)
@Rathan-Naik commented on GitHub (Jan 1, 2023):
Just getting started on contributions @AndrewBastin I can work on implementing the toggle.
@AndrewBastin commented on GitHub (Jan 6, 2023):
Cool @Rathan-Naik, please do let me know if you need any help/guidance.
Assigning the task to you.
@Ahishekoza commented on GitHub (Jan 28, 2023):
Hello @AndrewBastin,
I would like to contribute to this issue
@JManan commented on GitHub (Jun 24, 2023):
hey @AndrewBastin i would like to contribute to this issue. Please let me do it.
@AndrewBastin commented on GitHub (Jun 26, 2023):
@JManan sure.
@Pheonix075 commented on GitHub (Aug 7, 2023):
hey @AndrewBastin I would like to contribute to this issue.give me a chance
@VinayakSingh2001 commented on GitHub (Aug 18, 2023):
Hey @tejakummarikuntla I would like to work on this, can you please assign this to me !!
@tejakummarikuntla commented on GitHub (Aug 18, 2023):
Sorry @VinayakSingh2001 , I don't think I can help you here. Did you mean to tag @AndrewBastin ?
@yashnirmal commented on GitHub (Sep 14, 2023):
Hey @tejakummarikuntla is the issue still open?
@liudonghua123 commented on GitHub (Sep 15, 2023):
No PR currently?
I suggest to add a configuration named Encode(Encode the query params, three options provided, enable means always encode the params, disable means do not encode the params and auto means encode the params which contain some common special characters need to encode).
And only two group of settings available now, one for
Theme, another forInterceptor. Maybe a new group namedOtheris a good idea for this newEncodesetting.@meetdhanani17 commented on GitHub (Oct 2, 2023):
it is need to add a toggle like space as %20 or + or i change to direct convert space as %20?
@maneeshms commented on GitHub (Dec 28, 2023):
@tejakummarikuntla If this issue is still open and no PR raised yet, i would like to give a try.
@liyasthomas commented on GitHub (Dec 28, 2023):
Assigning to @maneeshms.
@TheDynamicPunk commented on GitHub (May 16, 2024):
Hey @liyasthomas it's been a while since there has been some activity on this thread. If you've still not received any PR's for this, maybe I can take a look with some assistance from you?
@Vaibhav-tech22 commented on GitHub (Jul 25, 2024):
Hey @liyasthomas, I see there are no activities on this bug. If no PRs have been raised in this matter. I would like to give it a try. Thanks.
@mohitsourav7 commented on GitHub (Sep 13, 2024):
Hi @AndrewBastin I see there are no activities on this bug .If you still haven't received any PR yet. I would like to give it a try
Regards
@satwikkini-01 commented on GitHub (Oct 2, 2024):
Hello Mr @AndrewBastin , even I would like to give a try to solve this issue.
This will be my first open source contribution :)
@AndrewBastin commented on GitHub (Oct 7, 2024):
@satwikkini-01 @mohitsourav7 if you are interested in opening a PR, feel free to do so, you do not need to wait on an assignment : )
@Pranay-Pandey commented on GitHub (Oct 7, 2024):
Hey, @AndrewBastin

I have raised a PR, with the changes suggested by @liudonghua123 .
But with these changes it seems the encoding takes place twice.
Any suggestions?
@jamesgeorge007 commented on GitHub (Nov 1, 2024):
#4412 Released in v2024.10.0.