the WriteApi does not check whether a tag value cotains unauthorized characters ("\n","\r"...)
まだ誰も着手していません。
評価
調査の方向性
まず、タグ値をInfluxDB line protocolにシリアライズするWriteApiのパスを追跡します。改行と復帰を含む値がどのように処理されるかを確認し、安全でない値によって部分的または不正な書き込みが発生しないようにバリデーションを追加します。既存のWriteApiテストがあれば、それを使って両方の文字をカバーします。
索引モデルが issue の本文から書いたものです。
説明
InfluxDB has some restrictions on tag values : they cannot contain some characters such as: line feed (\n), carriage return (\r). Currently, the Java client library does not check whether values of tags are safe (free of unauthorized characters) before writing them into InfluxDB.
For example, I have a measurement classe called Temperature, and it contains a tag field location. When I put location="mad\nrid" and I write it using WriteApi, it will throw the following exception: partial write: unable to parse 'temperature,location=mad': missing fields dropped=0. So a partial write will be done in the influxDB database: a new measurement rid will be mistakenly created, and it will contain only a part of the write.
If a tag value contains '\r', the java client will not even throw an exception, and it will perform an incorrect write into the database.
I think it would be really useful to add a method that ensures that tag values are correct before sending them to InfluxDB through the line protocol, in order to avoid incorrect writes and anomalous behaviors.
- 主要言語
- Java
- スター
- 1.2k
- フォーク
- 469
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
influxdata/influxdb-java のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
influxdata/influxdb-java#1012 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
influxdata/influxdb-java#1006 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
influxdata/influxdb-java#1005 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
influxdata/influxdb-java#999 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
influxdata/influxdb-java#970 ·
influxdata/influxdb-java の issue をすべて見る
似ている issue
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/rocketmq-dashboard#5064 ·