influxdb-client-csharp icon indicating copy to clipboard operation
influxdb-client-csharp copied to clipboard

[Question] prevent injection

Open mrmoein opened this issue 1 year ago • 0 comments

i want prevent injection when read and wirte data

my read query is like this:

var query = $"from(bucket:\"{_bucketName}\") " +
            $"|> {range[0]} " +
            $"|> filter(fn: (r) => r[\"device_id\"] == \"{deviceId}\") " +
            $"|> aggregateWindow(every: {range[1]}, fn: mean, createEmpty: false)" +
            "|> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")";

user send deviceId to my API

also i use POCO for writing data, should i sanitize my data?

mrmoein avatar May 03 '23 00:05 mrmoein