make sure argsSet verifies string isn't empty too#4980
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4980 +/- ##
==========================================
- Coverage 37.57% 37.53% -0.04%
==========================================
Files 322 322
Lines 47283 47283
==========================================
- Hits 17766 17749 -17
- Misses 26966 26983 +17
Partials 2551 2551
Continue to review full report at Codecov.
|
lafriks
approved these changes
Dec 27, 2018
zeripath
approved these changes
Dec 27, 2018
Contributor
zeripath
left a comment
There was a problem hiding this comment.
Seems sensible. I wouldn't be surprised if people were abusing this to set empty email addresses during tests however, so it might need a highlight in the changelog, (and I should check I haven't done so myself.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Else
./gitea admin create-user --name "dd" --email " " -password ""( empty email and an empty password)./gitea admin create-user --name oopsdd --email test@test.ddses -password ""(empty password) would work./gitea admin create-user --name oopsdd --email test@test.ddses -password " "You cannot even enter an empty string via the ui since the input field has
requiredIf " " is accepted as an email in the cli, the user would end up updating in the settings page since the input field of the email is
emailand it would keep prompting to input a valid email address