mappersmith
mappersmith copied to clipboard
Unlikly but possible data leakage
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
});