Skip to content

fix: proto could be set during parse - #328320

Open
Raymond Zhao (rzhao271) wants to merge 4 commits into
mainfrom
rzhao271/hurt-canid
Open

fix: proto could be set during parse#328320
Raymond Zhao (rzhao271) wants to merge 4 commits into
mainfrom
rzhao271/hurt-canid

Conversation

@rzhao271

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Hardens the shared JSON parser against __proto__ prototype mutation.

Changes:

  • Skips __proto__ during object construction.
  • Adds a regression test verifying the prototype remains unchanged.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/base/common/json.ts Guards object property assignment.
src/vs/base/test/common/json.test.ts Tests __proto__ handling.

Comment thread src/vs/base/common/json.ts Outdated
Comment thread src/vs/base/common/json.ts Outdated
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
…Parser

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
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.

3 participants