Skip to content

Add validation/prevent --set-owner, --set-owner-short, and --set-ham … #782

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Crank-Git
Copy link

…from accepting empty or whitespace-only names. This is in relation to feature request meshtastic/firmware#6867.

Added test validation and when trying to set long, short, and ham names we get the following via the cli:

python -c "import sys; sys.argv = ['', '--set-ham', '   ']; from meshtastic.__main__ import main; main()"
ERROR: Ham ID cannot be empty or contain only whitespace characters

python -c "import sys; sys.argv = ['', '--set-owner', '   ']; from meshtastic.__main__ import main; main()"
ERROR: Long Name cannot be empty or contain only whitespace characters

python -c "import sys; sys.argv = ['', '--set-owner-short', '   ']; from meshtastic.__main__ import main; main()"
ERROR: Short Name cannot be empty or contain only whitespace characters

Please let me know if there is anything else that I should add or modify. I have no idea what I am doing with Android SDK/development, so I believe someone will need to add this validation so the app also gives an error/warning when trying to set these.

…from accepting empty or whitespace-only names. This is in relation to meshtastic#6867 firmware feature request meshtastic/firmware#6867
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 this pull request may close these issues.

2 participants