-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bugfix/request disappearing #1181
base: main
Are you sure you want to change the base?
Bugfix/request disappearing #1181
Conversation
Thank you @bpoulaindev ! I have some comments
|
Eventually why would we need to decode the URI for a password ? I can't see how we could have a function that can preserve an uri and a password at the same time without breaking it. Or we could decode it only when the value starts by "https" or "http" |
@bpoulaindev The It's related to #571 |
I eventually opted for non-decoding passwords and keeping encodeURI for every other field |
@@ -105,7 +105,7 @@ const mapPairListToKeyValPairs = (pairList = [], parseEnabled = true) => { | |||
} | |||
return _.map(pairList[0], (pair) => { | |||
let name = _.keys(pair)[0]; | |||
let value = decodeURIComponent(pair[name]); | |||
let value = name === 'password' ? pair[name] : decodeURIComponent(pair[name]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bpoulaindev We need to solve this in a generic way and should not hardcode this to apply to any key-val pair that has the name password
The mapPairListToKeyValPairs
is used to parse all key val pairs (headers, assertions, vars, query params)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@helloanoop how could you have a generic function that work both on a password (which can be of any form), a random string and an encoded URL with params ?
Edit : we could encode everything in base 64 but i'm afraid it would hurt performance
Description
Solving issue #1076
Added override decodeURIComponentSafe function to prevent % character being escaped
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.