We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aeb3e27 commit bc8eceeCopy full SHA for bc8ecee
test/proto.js
@@ -42,3 +42,19 @@ test('proto pollution (constructor)', function (t) {
42
t.equal(argv.y, undefined);
43
t.end();
44
});
45
+
46
+test('proto pollution (constructor function)', function (t) {
47
+ var argv = parse(['--_.concat.constructor.prototype.y', '123']);
48
+ function fnToBeTested() {}
49
+ t.equal(fnToBeTested.y, undefined);
50
+ t.equal(argv.y, undefined);
51
+ t.end();
52
+});
53
54
+// powered by snyk - https://github.com/backstage/backstage/issues/10343
55
+test('proto pollution (constructor function) snyk', function (t) {
56
+ var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' '));
57
+ t.equal((function(){}).foo, undefined);
58
59
60
+})
0 commit comments