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

Unlikly but possible data leakage #113

Open
NVolcz opened this issue Aug 23, 2018 · 0 comments
Open

Unlikly but possible data leakage #113

NVolcz opened this issue Aug 23, 2018 · 0 comments

Comments

@NVolcz
Copy link

NVolcz commented Aug 23, 2018

Inserting dynamic parameters is currently done with loop + regexp + string.replace this can cause data leakage under certain circumstances.

The fix would be to use a replace callback, something like this:

  path = path.replace(new RegExp('{([^}]+)}', 'g'), function(match, prop) {
    return params[prop]; // perhaps URL encode too
    // perhaps throw error if property does not exist
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants