-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
make sure argsSet verifies string isn't empty too #4980
make sure argsSet verifies string isn't empty too #4980
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.)
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
required
If " " 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
email
and it would keep prompting to input a valid email address