Skip to content

Make AppRegistry keys prototype-safe - #58197

Open
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:fix/app-registry-prototype-keys
Open

Make AppRegistry keys prototype-safe#58197
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:fix/app-registry-prototype-keys

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary:

AppRegistry stores public app and section keys in plain objects. Inherited names such as constructor resolve without registration, while __proto__ mutates the registry prototype and disappears from key enumeration. Use prototype-free internal registries and add exact app/section regressions.

Fixes #58196.

Changelog:

[GENERAL] [FIXED] - Store AppRegistry app and section keys without Object prototype collisions.

Test Plan:

  • Focused AppRegistry Jest regressions: 2 tests passed.
  • Full Flow: 0 errors.
  • Targeted ESLint, Prettier check, and git diff --check passed.

No UI change; screenshots are not applicable.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AppRegistry mishandles keys inherited from Object.prototype

1 participant