Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.45k stars 1.07k forks source link

Configuration parser should handle quotes #5643

Open mpfz0r opened 5 years ago

mpfz0r commented 5 years ago

If you provide a path to a file or directory in graylog.conf that contains quotes, like message_journal_dir = "data/journal" we will use them literally for the directory. This can lead to some head scratching. Sometimes graylog will create directories with quotes: ./"data/journal"/messagejournal-0, or fail with an error message that isn't obvious:

com.github.joschi.jadconfig.ValidationException: Cannot execute integrations_scripts_dir at path "/var/tmp". Please specify the correct path or change the permissions

Expected Behavior

We should either interpret quoted strings, or reject them while parsing the configuration.

bernd commented 5 years ago

This is the library we are using for config parsing. So we could check if it somehow supports quoted values or open an issue/PR over there.

https://github.com/joschi/JadConfig

mpfz0r commented 4 years ago

Another annoyance is that comma separated lists are not stripped from whitespaces: my_list = foo, bar, baz becomes "foo", " bar" and " baz"