Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For the time flag, I made sure that the user couldn't specify higher than 240, but didn't check the floor. The regex allows the time=0 to pass through, and right now, it makes the UI kinda freak out. It wasn't apparent to me whether or not it was making a lot of requests to the backend at the time, but either way, it's something to be fixed.
We don't want time=0 to be possible, so I've made it so that if time=0 is specified, it will just resort to the default.
One thing to note as this change will still allow time entries like 024 or any number that starts with 0 or 00. It will just take the value of the first non-zero numbers. For example, 024 just resulted in a 24 hour code. Something like 001 will just result in an hour long code.
I know we can limit this with the regex by making it so leading zeros aren't valid; this will just make the timeout the default 30 minutes.
I don't have a strong preference for one over the other, but the zero check is the first solution I thought of.