the WriteApi does not check whether a tag value cotains unauthorized characters ("\n","\r"...)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia tracciando il percorso di WriteApi che serializza i valori dei tag nel line protocol di InfluxDB. Verifica come vengono gestiti i valori contenenti avanzamento riga e ritorno a capo, quindi aggiungi la validazione affinché i valori non sicuri non possano produrre scritture parziali o errate; usa i test WriteApi esistenti, se presenti, per coprire entrambi i caratteri.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 469
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di influxdata/influxdb-java
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
influxdata/influxdb-java#1012 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
influxdata/influxdb-java#1006 · 1 commento · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
influxdata/influxdb-java#1005 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
influxdata/influxdb-java#999 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
influxdata/influxdb-java#970 ·
Tutte le issue di influxdata/influxdb-java
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/flink-agents#1152 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
objectionary/eo-graphs#75 ·