v2 new release (#77)
This commit is contained in:
committed by
GitHub
parent
217bf70cbd
commit
199ab446df
16
node_modules/minimist/test/proto.js
generated
vendored
16
node_modules/minimist/test/proto.js
generated
vendored
@ -42,3 +42,19 @@ test('proto pollution (constructor)', function (t) {
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (constructor function)', function (t) {
|
||||
var argv = parse(['--_.concat.constructor.prototype.y', '123']);
|
||||
function fnToBeTested() {}
|
||||
t.equal(fnToBeTested.y, undefined);
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
// powered by snyk - https://github.com/backstage/backstage/issues/10343
|
||||
test('proto pollution (constructor function) snyk', function (t) {
|
||||
var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' '));
|
||||
t.equal((function(){}).foo, undefined);
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
})
|
||||
|
Reference in New Issue
Block a user