Skip to content

feat: Protect against prototype poisoning#87

Merged
fengmk2 merged 1 commit intomasterfrom
protect-prototype-poisoning
Jun 5, 2024
Merged

feat: Protect against prototype poisoning#87
fengmk2 merged 1 commit intomasterfrom
protect-prototype-poisoning

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Jun 5, 2024

follow fastify/fastify#1427

throw SyntaxError when prototype poisoning happen by default

closes #70

follow fastify/fastify#1427

throw SyntaxError when prototype poisoning happen by default
Copy link
Copy Markdown
Contributor

@killagu killagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Jun 5, 2024

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Jun 5, 2024

performance expressjs/body-parser#347 (comment)

JSON.parse(): 476,018 ops/sec
Bourne.parse(): 458,014 ops/sec
JSON.parse() followed by Bourne.scan(): 380,877 ops/sec
JSON.parse() with reviver: 183,411 ops/sec

@fengmk2 fengmk2 merged commit 2bc63a5 into master Jun 5, 2024
@fengmk2 fengmk2 deleted the protect-prototype-poisoning branch June 5, 2024 07:58
fengmk2 added a commit to eggjs/egg that referenced this pull request Jun 7, 2024
fengmk2 added a commit to eggjs/egg that referenced this pull request Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protect against prototype poisoning

2 participants