You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System info: InfluxDB v1.1.0 (downloaded, not built), Ubuntu 15.04 64-bit Intel
Steps to reproduce:
Startup InfluxDB and create a database. curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=CREATE DATABASE \"Test1\""
Add content to create measurement. curl -XPOST 'http://influxdb:8086/write?db=Test1' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
You should see the /var/lib/influxdb/data directory with Test1 and _internal sub-directories.
Execute 'DROP DATABASE' without a name specifically like the following: curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=DROP DATABASE \"\""
No error is returned or logged but the entire /var/lib/influxdb/data is gone (including _internal).
Expected behavior: Return an error if no database name is provided.
Actual behavior: Deleted the entire /influxdb/data directory.
The DROP DATABASE with no name was a bug in my code where a null name got through but the consequences are pretty bad since all the data files are gone. The system worked ok for a couple days until influxdb was restarted of course. Errors about missing files started appearing only in the logs a few seconds after the drop.
The text was updated successfully, but these errors were encountered:
Fixes#7822
This change first ensures that databases and retention policies exist
before attempting to remove them from the Store. It also adds some
checks in the `DeleteDatabase` and `DeleteRetentionPolicy` to ensure
that maliciously named entries won't remove anything outside of the
configured data directory.
Bug report
System info: InfluxDB v1.1.0 (downloaded, not built), Ubuntu 15.04 64-bit Intel
Steps to reproduce:
Startup InfluxDB and create a database.
curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=CREATE DATABASE \"Test1\""
Add content to create measurement.
curl -XPOST 'http://influxdb:8086/write?db=Test1' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
You should see the /var/lib/influxdb/data directory with Test1 and _internal sub-directories.
Execute 'DROP DATABASE' without a name specifically like the following:
curl -XPOST "http://influxdb:8086/query" --data-urlencode "q=DROP DATABASE \"\""
No error is returned or logged but the entire /var/lib/influxdb/data is gone (including _internal).
Expected behavior: Return an error if no database name is provided.
Actual behavior: Deleted the entire /influxdb/data directory.
The DROP DATABASE with no name was a bug in my code where a null name got through but the consequences are pretty bad since all the data files are gone. The system worked ok for a couple days until influxdb was restarted of course. Errors about missing files started appearing only in the logs a few seconds after the drop.
The text was updated successfully, but these errors were encountered: