-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Custom deepmerge implementation #17982
[core] Custom deepmerge implementation #17982
Conversation
82163e3
to
0abe826
Compare
@material-ui/core: parsed: -0.46% 😍, gzip: -0.52% 😍 Details of bundle changes.Comparing: cdc4b98...5ace5ab
|
Performance seems to be better too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is vulnerable to prototype pollution which is prevented in deepmerge.
What do you mean by prototype pollution? Should we add a test case about it? The aim of this new module is to support simple objects deep merge. |
There are several CVEs out there describing this security issue. Since this is a public function and we don't sanitize the passed theme and don't control the environment we need to address it. Wide range of source: |
a5a2d23
to
8b20a28
Compare
@eps1lon Thanks for the resources. I'm adding a test case, well spotted. |
8b20a28
to
5ace5ab
Compare
Give a try. I'm curious about the bundle size reduction. I guess, 500 B.
Closes #17981.