oasis-core icon indicating copy to clipboard operation
oasis-core copied to clipboard

throw error, if '~' is used in oasis-node config file for paths

Open matevz opened this issue 4 years ago • 0 comments

SUMMARY

Using ~ in the config file for oasis-node does not work, for example:

datadir: ~/node/data

In this case badger will create a new directory called ~ in cwd instead of interpreting the symbol as home and then oasis-node will crash saying it cannot access ~/node/data directory. One can image what a rm -r ~ would then result without escaping the ~ symbol in :wink:

EXPECTED RESULTS

I suggest we throw error when parsing the config file, if any of the paths contain ~ symbol. Are there any other special characters in posix paths we should avoid?

matevz avatar Nov 08 '21 11:11 matevz