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

make sure argsSet verifies string isn't empty too #4980

Merged
merged 11 commits into from
Dec 27, 2018

Conversation

adelowo
Copy link
Member

@adelowo adelowo commented Sep 26, 2018

Else

  • ./gitea admin create-user --name "dd" --email " " -password "" ( empty email and an empty password)

  • ./gitea admin create-user --name oopsdd --email [email protected] -password "" (empty password) would work

  • ./gitea admin create-user --name oopsdd --email [email protected] -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

@codecov-io
Copy link

codecov-io commented Sep 26, 2018

Codecov Report

Merging #4980 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
models/repo_indexer.go 44.49% <0%> (-5.51%) ⬇️
modules/indexer/repo.go 63.35% <0%> (-5.35%) ⬇️
modules/process/manager.go 81.15% <0%> (+4.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a685f8...a5057ec. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 26, 2018
@lafriks lafriks added the type/enhancement An improvement of existing functionality label Sep 26, 2018
@lafriks lafriks added this to the 1.7.0 milestone Sep 26, 2018
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 27, 2018
Copy link
Contributor

@zeripath zeripath left a 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.)

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 27, 2018
@lafriks lafriks merged commit a82ba73 into go-gitea:master Dec 27, 2018
@adelowo adelowo deleted the password_cannot_not_be_empty branch December 29, 2018 08:48
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants