Skip to content

Commit

Permalink
revert, the test needs to continue testing prototype pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 7, 2024
1 parent b891ccf commit fd12e42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mui-utils/src/deepmerge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import deepmerge from './deepmerge';
describe('deepmerge', () => {
// https://snyk.io/blog/after-three-years-of-silence-a-new-jquery-prototype-pollution-vulnerability-emerges-once-again/
it('should not be subject to prototype pollution', () => {
const result = deepmerge(
deepmerge(
{},
JSON.parse('{ "myProperty": "a", "__proto__" : { "isAdmin" : true } }'),
{
clone: false,
},
);

expect(result).not.to.have.property('isAdmin');
expect({}).not.to.have.property('isAdmin');
});

it('should merge objects across realms', () => {
Expand Down

0 comments on commit fd12e42

Please sign in to comment.