added test case

This commit is contained in:
d3v53c 2020-12-07 22:40:14 -08:00
parent b2530119b9
commit 6101694397
1 changed files with 4 additions and 0 deletions

View File

@ -24,4 +24,8 @@ describe('loadPackageDefinition', () => {
loadPackageDefinition({'__proto__.polluted': true} as any);
assert.notStrictEqual(({} as any).polluted, true);
});
it('Should not allow prototype pollution #2', () => {
loadPackageDefinition({'constructor.prototype.polluted': true} as any);
assert.notStrictEqual(({} as any).polluted, true);
});
});