Heads up: max_program_size deprecation will require re2j changes to allow validation
まだ誰も着手していません。
評価
調査の方向性
この issue は re2j の Pattern と Prog.inst を指摘している一方で、このリポジトリは GoogleRE2 を明示的には管理していない可能性があると述べています。まず、java-control-plane に regex プログラムサイズの検証エントリーポイントがあるか確認してください。完了とするには、実装が必要かどうかを確認し、関連する re2j の変更範囲を定める必要があります。
索引モデルが issue の本文から書いたものです。
説明
This is just documenting the information that may be necessary if java-control-plane wants to start validating regular expression max_program_sizes. This is unnecessary if the regular expressions are considered "trusted" (known to be non-malicious).
I had this information and wanted to dump it somewhere that it may be useful if the need arises. It seems there is no explicit management of GoogleRE2 in this repo. Feel free to close.
In https://github.com/envoyproxy/envoy/pull/10971, Envoy deprecated the max_program_size configuration field in favor of the control plane being responsible. This is great, and works for C++ and Go languages, but leaves some TODOs for Java.
The C++ re2 exposes RE2::ProgramSize() which reports the number of instructions of the compiled regular expression. This is the "program size" that Envoy was referring to.
Go's regexp/syntax package allows getting something similar:
regex, err := syntax.Parse("INPUT HERE", 0)
prog, err := syntax.Compile(regex)
len(prog.Inst) // this is the program size
But it does not appear re2j supports such a feature. Basically, you will need a new Pattern method that returns the length of Prog.inst (via re2.prog).
- 主要言語
- Java
- スター
- 312
- フォーク
- 150
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
envoyproxy/java-control-plane のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
envoyproxy/java-control-plane#481 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
envoyproxy/java-control-plane#471 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
envoyproxy/java-control-plane#463 ·
-
help オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
envoyproxy/java-control-plane#432 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
envoyproxy/java-control-plane#411 ·
envoyproxy/java-control-plane の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
1.0.0-alpha2 Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wso2/dpdp-accelerator#272 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
infinispan/infinispan#18150 ·
-
area/frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100