Skip to content

fix: do not iterate over prototype properties of reducers#80

Merged
Rich-Harris merged 4 commits into
sveltejs:mainfrom
danielroe:fix/proto
Sep 25, 2024
Merged

fix: do not iterate over prototype properties of reducers#80
Rich-Harris merged 4 commits into
sveltejs:mainfrom
danielroe:fix/proto

Conversation

@danielroe

@danielroe danielroe commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

reproduction: https://stackblitz.com/edit/stackblitz-starters-iiewc5

import { stringify } from 'devalue';

let a = {};
a.__proto__.appConfigEnabled = 1;

stringify({}, {});
// Error: fn is not a function

@Rich-Harris

Copy link
Copy Markdown
Member

thank you — looks like this causes tests to fail, any ideas?

@danielroe

Copy link
Copy Markdown
Contributor Author

apologies for that!

@Rich-Harris

Copy link
Copy Markdown
Member

ah, I see now — thanks!

@Rich-Harris Rich-Harris merged commit ed122c6 into sveltejs:main Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants