react / react/react-native

structuredClone reads user-overridden RegExp properties

オープン
#58,224 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Author Feedback Needs: Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

The React Native structuredClone polyfill reads value.source and value.flags, so own overrides replace a RegExp's internal pattern/flags while cloning. Capturing only the aggregate flags getter is also insufficient because it reads user-visible per-flag properties such as global.

Expected behavior

RegExp cloning should read the built-in internal source and canonical d g i m s u v y flags without invoking or trusting own overrides, matching native structuredClone.

React Native Version

0.87.1 and current main

Affected Platforms

JavaScript runtime - All

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

React Native の structuredClone polyfill のエントリポイントから開始し、RegExp の処理を確認します。source、flags、および個々の flag プロパティに対する own override の回帰テストを追加し、その後、関連する structuredClone テストを実行します。RegExp のクローンがユーザーの override を呼び出さずに組み込みのパターンと canonical flags を使用すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react-native
領域
mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。