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

Replace querystring.unescape with decodeURI #3148

Closed
wants to merge 1 commit into from
Closed

Replace querystring.unescape with decodeURI #3148

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 3, 2019

PR Checklist:

  • I have run npm test locally and all tests are passing.
  • I have added/updated tests for any new behavior.
  • If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description

This addresses (closed) issues #1627 and #1619 which we also hit recently.

Our initial attempts to use couchdb-nano uncovered in this issue, where a URI with basic authorization in it was throwing the error self._qs.unescape is not a function.
This may be due to webpack in our Vue.js environment.

var nano = require('nano')('http://user:password@localhost:5984');
(using nano after this results in request throwing the error

To fix it on our end, I've simply replaced self._qs.unescape with the decodeURI standard javascript call. This now functions correctly in our environment. The issues above mention this issue in Electron builds, which are likely similar to our standard Vue.js (webpack) configuration. As mentioned by @stevage in #1627, I hope this is a benign and fairly straightforward change.

This querystring.unescape call was referenced here:

#475 Use unescape from querystring (@shimaore)

Thanks!

@stale
Copy link

stale bot commented Apr 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 3, 2020
@stale stale bot closed this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants