Skip to content

Commit

Permalink
Used encodeURIComponent() instead of querystrings.escape()
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiCoder committed Nov 26, 2019
1 parent 41ba61e commit cc85cfa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/collection/proxy-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var _ = require('../util').lodash,
querystring = require('querystring'),
Property = require('./property').Property,
PropertyList = require('./property-list').PropertyList,
Url = require('./url').Url,
Expand Down Expand Up @@ -233,10 +232,10 @@ _.assign(ProxyConfig.prototype, /** @lends ProxyConfig.prototype */ {
// Add authentication method to URL if the same is requested. We do it this way because
// this is how `postman-request` library accepts auth credentials in its proxy configuration.
if (this.authenticate) {
auth = querystring.escape(this.username || E);
auth = encodeURIComponent(this.username || E);

if (this.password) {
auth += COLON + querystring.escape(this.password);
auth += COLON + encodeURIComponent(this.password);
}

if (auth) {
Expand Down

0 comments on commit cc85cfa

Please sign in to comment.