Skip to content

Commit 6101694

Browse files
committed
added test case
1 parent b253011 commit 6101694

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/grpc-js/test/test-prototype-pollution.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ describe('loadPackageDefinition', () => {
2424
loadPackageDefinition({'__proto__.polluted': true} as any);
2525
assert.notStrictEqual(({} as any).polluted, true);
2626
});
27+
it('Should not allow prototype pollution #2', () => {
28+
loadPackageDefinition({'constructor.prototype.polluted': true} as any);
29+
assert.notStrictEqual(({} as any).polluted, true);
30+
});
2731
});

0 commit comments

Comments
 (0)