Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matevz opened this issue Nov 8, 2021 · 0 comments
Open

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

matevz opened this issue Nov 8, 2021 · 0 comments
Labels
c:bug Category: bug c:cli Category: command line interface p:2 Priority: desired feature

Comments

@matevz
Copy link
Member

matevz commented Nov 8, 2021

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 😉

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 matevz added p:2 Priority: desired feature c:bug Category: bug c:cli Category: command line interface labels Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:bug Category: bug c:cli Category: command line interface p:2 Priority: desired feature
Projects
None yet
Development

No branches or pull requests

1 participant