Skip to content

fix: avoid __proto__ accessor#6349

Merged
mergify[bot] merged 1 commit intomasterfrom
markm-avoid-proto-accessor
Oct 3, 2022
Merged

fix: avoid __proto__ accessor#6349
mergify[bot] merged 1 commit intomasterfrom
markm-avoid-proto-accessor

Conversation

@erights
Copy link
Copy Markdown
Member

@erights erights commented Sep 28, 2022

Salesforce deletes Object.prototype.__proto__ for safety reasons. We may do so as well. In any case, we should not assume it has not been overridden. So delete all uses of this accessor property that would break if it were absent or deleted.

@erights
Copy link
Copy Markdown
Member Author

erights commented Sep 28, 2022

See also endojs/endo#1303

@erights erights force-pushed the markm-avoid-proto-accessor branch from 9fd6bfe to 83977ba Compare September 29, 2022 03:33
@erights erights force-pushed the markm-avoid-proto-accessor branch from 83977ba to 9b89986 Compare October 1, 2022 03:44
@erights
Copy link
Copy Markdown
Member Author

erights commented Oct 3, 2022

@FUDCo ping. These are the only cases I know of that would break if Object.prototype.__proto__ were deleted.

(Though I haven't tested. Testing may very well reveal others.)

Copy link
Copy Markdown
Collaborator

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

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

Ya shoor, you betcha.

@erights erights added the automerge:squash Automatically squash merge label Oct 3, 2022
@mergify mergify bot merged commit eac70a5 into master Oct 3, 2022
@mergify mergify bot deleted the markm-avoid-proto-accessor branch October 3, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge:squash Automatically squash merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants