diff options
Diffstat (limited to 'test/mapValues.js')
-rw-r--r-- | test/mapValues.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mapValues.js b/test/mapValues.js index 3264337..6d089fb 100644 --- a/test/mapValues.js +++ b/test/mapValues.js @@ -60,6 +60,17 @@ describe('mapValues', () => { done(); }, 50); }); + + it('prototype pollution', (done) => { + var input = JSON.parse('{"a": 1, "b": 2, "__proto__": { "exploit": true }}'); + + async.mapValues(input, (val, key, next) => { + next(null, val) + }, (err, result) => { + expect(result.exploit).to.equal(undefined) + done(err); + }) + }) }); context('mapValues', () => { |