From 1043d212c3caaf871966e710f52cfdf02f9eea4b Mon Sep 17 00:00:00 2001 From: substack Date: Wed, 11 Mar 2020 09:20:03 -1000 Subject: [PATCH] additional test for constructor prototype pollution --- test/proto.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/proto.js b/test/proto.js index 7713559..8649107 100644 --- a/test/proto.js +++ b/test/proto.js @@ -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(); +});