\n in a field value breaks the FluxCsvParser
gmoigneu opened this issue · 2 comments
gmoigneu commented
Steps to reproduce:
- Inject "\n" in a field
- Query that field (stream, raw or query have the same behavior)
Expected behavior:
The response should escape weird characters in a field and not detect them as end of line.
Actual behavior:
The parser detects "\n" as end of line:
// Break when a new line is found
if ($byte === "\n") {
break;
}
We end up with a row that has less array values than the headers. Triggering an exception on parseRecord()
:
$strVal = $csv[$fluxColumn->index + 1];
Specifications:
- Client Version: 50738a7
- InfluxDB Version: Influx Cloud as of Nov. 3rd