AppRegistry mishandles keys inherited from Object.prototype
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- react-native
- 領域
- mobile
研究方向
從報告中提到的 AppRegistry 公開入口開始:getRunnable()、registerApp 或 section 註冊,以及 getAppKeys()/getSectionKeys()。重現建構函式查找和 proto 註冊的情況,然後檢查鍵是如何儲存和解析的。完成的標準是:未註冊的繼承名稱無法解析,且每個已註冊的字串鍵都出現在相應的鍵清單中。
由索引模型根據 Issue 內容生成。
描述
Description
The public AppRegistry stores app and section keys in plain object literals. Looking up an unregistered key such as constructor returns an inherited Object member. Registering the valid string key __proto__ mutates the registry prototype rather than creating an own entry, so the app/section key lists omit it.
The defect is present in React Native 0.87.1 and current main.
Steps to reproduce
Call AppRegistry.getRunnable("constructor"), then register an app or section named __proto__ and inspect getAppKeys() / getSectionKeys().
Expected behavior
Only explicitly registered keys should resolve, and all string app/section keys should be stored as ordinary own entries.
React Native Version
0.87.1 and current main.
- 主要語言
- C++
- 星號
- 127k
- 分支
- 25.3k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react/react-native 的其他 Issue
-
Needs: Author Feedback Needs: Repro
難度 2/5 1-3 小時 新手友好度 75/100
react/react-native#58659 · 2 則留言 ·
維護者通常 1 天內回覆
-
Needs: Author Feedback Needs: Repro
難度 1/5 1 小時以內 新手友好度 92/100
react/react-native#58621 · 1 則留言 ·
維護者通常 1 天內回覆
-
Add TypeScript declaration for the performance global可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 85/100
react/react-native#58610 · 4 則留言 ·
維護者通常 1 天內回覆
-
Needs: Triage :mag:
難度 2/5 1-3 小時 新手友好度 82/100
react/react-native#58565 · 2 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
[Android][Fabric] addViewAt hard-crashes on a placeholder ViewState synthesised by updateEventEmitter可能已有人在做 @wneel 於 21 天前認領。 未關閉Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 85/100
react/react-native#58526 · 2 則留言 ·
維護者通常 1 天內回覆
查看 react/react-native 的全部 Issue
相似的 Issue
-
code-quality libc++
難度 1/5 1 小時以內 新手友好度 82/100
llvm/llvm-project#229284 ·
維護者通常 1 天內回覆
-
test-issue
難度 2/5 1-3 小時 新手友好度 82/100
llvm/offload-test-suite#1557 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
maplibre/maplibre-native#4723 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
HarbourMasters/Shipwright#7320 ·
維護者通常 1 天內回覆