Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

the WriteApi does not check whether a tag value cotains unauthorized characters ("\n","\r"...)

Aperta
#684 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
databases

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di influxdata/influxdb-java

Tutte le issue di influxdata/influxdb-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.