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

Bad timezone input validation #115

Closed
vilhelmprytz opened this issue Nov 13, 2020 · 1 comment · Fixed by #143
Closed

Bad timezone input validation #115

vilhelmprytz opened this issue Nov 13, 2020 · 1 comment · Fixed by #143
Assignees
Labels
bug Something isn't working

Comments

@vilhelmprytz
Copy link
Member

Describe the bug
A partly valid timezone, e.g. Europe (which is included as a substring in timezones like Europe/Stockholm) will be accepted by the current input validation since it only checks if the user input string is somewhere to be found in the string with the list of all timezones. It does not check whether it's a "valid" timezone of its own.

To Reproduce
Steps to reproduce the behavior:

  1. When the script asks to set a timezone, try an obviously invalid one to make sure that it actually doesn't allow you to input anything.
  2. Enter something like Europe and notice that the script will accept it as valid, even though it isn't.

Expected behaviour
I expect the script to know the difference between valid timezones and substrings of valid timezones.

Screenshots
Example use of invalid timezone

OS (please complete the following information):

  • OS: all
  • Installation: panel

Additional context
N/A

@vilhelmprytz vilhelmprytz added the bug Something isn't working label Nov 13, 2020
@vilhelmprytz vilhelmprytz self-assigned this Jan 18, 2021
@vilhelmprytz
Copy link
Member Author

Fixed by #143 (forgot to add in initial PR).

vilhelmprytz added a commit that referenced this issue Jan 18, 2021
forgot to add changes from #115. #113 is now in "bug fixes" and #115 as "changed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant