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

Don't load non-json rockon config files? #2473

Closed
kanecko opened this issue Jan 19, 2023 · 3 comments · Fixed by #2482
Closed

Don't load non-json rockon config files? #2473

kanecko opened this issue Jan 19, 2023 · 3 comments · Fixed by #2482

Comments

@kanecko
Copy link
Contributor

kanecko commented Jan 19, 2023

This happened on 4.5.4-0.

I have added omada-controller.json to the usual place in order to install it as a rockon via WebUI. Because I make a lot of amendments during testing, my text editor creates a backup file to the same dir but appends a tilde: omada-controller.json~

I have found that when clicking the Update button in WebUI, an arbitrary file is chosen from that dir. Sometimes with the tilde, sometimes without.

I suggest that you search for more specific rockon config files. E.g. that they end with, and only with ".json".
Of course, it is my duty to make sure only one, valid JSON rockon config file is in that dir, but I thought I put up the issue up for discussion anyway.

I'm confident that this can be repro'd by placing any two .json and json~ files in the dir.

1674120763716 - Copy

@phillxnet
Copy link
Member

@kanecko Thanks for creating this issue, much appreciated. And I totally agree.
Do you fancy preparing a pull request against this issue?
We have the following extensive wiki guide on the forum written by @FroggyFlox on how our Rock-on subsystem works:
https://forum.rockstor.com/t/rock-on-framework-implementation/6288

@kanecko
Copy link
Contributor Author

kanecko commented Jan 19, 2023

Maybe. My first priority is setting up my home network before my vacation time runs out :)

@FroggyFlox FroggyFlox linked a pull request Jan 24, 2023 that will close this issue
phillxnet added a commit that referenced this issue Jan 25, 2023
Update rockon.py - only load files with a .JSON extension #2473
@phillxnet
Copy link
Member

Closing as:
Fixed by #2482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants