Skip to content

Commit 1043d21

Browse files
author
substack
committed
additional test for constructor prototype pollution
1 parent 6457d74 commit 1043d21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/proto.js

+7
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ test('proto pollution (string)', function (t) {
3535
t.equal(argv.x.z, undefined);
3636
t.end();
3737
});
38+
39+
test('proto pollution (constructor)', function (t) {
40+
var argv = parse(['--constructor.prototype.y','123']);
41+
t.equal({}.y, undefined);
42+
t.equal(argv.y, undefined);
43+
t.end();
44+
});

0 commit comments

Comments
 (0)