Skip to content

Commit

Permalink
additional test for constructor prototype pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
substack committed Mar 11, 2020
1 parent 6457d74 commit 1043d21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ test('proto pollution (string)', function (t) {
t.equal(argv.x.z, undefined);
t.end();
});

test('proto pollution (constructor)', function (t) {
var argv = parse(['--constructor.prototype.y','123']);
t.equal({}.y, undefined);
t.equal(argv.y, undefined);
t.end();
});

0 comments on commit 1043d21

Please sign in to comment.