express-fileupload
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -1,2 +0,2 @@ | ||
const INVALID_KEYS = ['__proto__']; | ||
const INVALID_KEYS = ['__proto__', 'constructor']; | ||
@@ -3,0 +3,0 @@ module.exports = function(data){ |
{ | ||
"name": "express-fileupload", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"author": "Richard Girges <richardgirges@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Simple express file upload middleware that wraps around Busboy", |
@@ -50,9 +50,11 @@ 'use strict'; | ||
it('Do not allow prototype pollution', () => { | ||
const pollutionOb = JSON.parse(`{"__proto__.POLLUTED": "FOOBAR"}`); | ||
const pollutionOb1 = JSON.parse(`{"__proto__.POLLUTED1": "FOOBAR"}`); | ||
const pollutionOb2 = JSON.parse(`{"constructor.prototype.POLLUTED2": "FOOBAR"}`); | ||
processNested(pollutionOb); | ||
processNested(pollutionOb1); | ||
processNested(pollutionOb2); | ||
// eslint-disable-next-line no-undef | ||
assert.equal(global.POLLUTED, undefined); | ||
assert.equal(global.POLLUTED1, undefined); | ||
assert.equal(global.POLLUTED2, undefined); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1212671
2244