[PR #4980] [MERGED] make sure argsSet verifies string isn't empty too #17576

Closed
opened 2025-11-02 14:11:08 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4980
Author: @adelowo
Created: 9/26/2018
Status: Merged
Merged: 12/27/2018
Merged by: @lafriks

Base: masterHead: password_cannot_not_be_empty


📝 Commits (10+)

  • d10944e make sure argsSet verifies string isn't empty too
  • adbed50 Merge branch 'master' into password_cannot_not_be_empty
  • 727a9e9 Merge branch 'master' into password_cannot_not_be_empty
  • 34ce416 Merge branch 'master' into password_cannot_not_be_empty
  • fdf2afd Merge branch 'master' into password_cannot_not_be_empty
  • 2d7aaf6 Merge branch 'master' into password_cannot_not_be_empty
  • bf7b966 Merge branch 'master' into password_cannot_not_be_empty
  • baa8e72 Merge branch 'master' into password_cannot_not_be_empty
  • 463ce8a Merge branch 'master' into password_cannot_not_be_empty
  • 9170e91 Merge branch 'master' into password_cannot_not_be_empty

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 cmd/cmd.go (+5 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4980 **Author:** [@adelowo](https://github.com/adelowo) **Created:** 9/26/2018 **Status:** ✅ Merged **Merged:** 12/27/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `password_cannot_not_be_empty` --- ### 📝 Commits (10+) - [`d10944e`](https://github.com/go-gitea/gitea/commit/d10944eb913312468619610fd3fc10059c286974) make sure argsSet verifies string isn't empty too - [`adbed50`](https://github.com/go-gitea/gitea/commit/adbed507259cec65a991de7e32fc14c6201ce754) Merge branch 'master' into password_cannot_not_be_empty - [`727a9e9`](https://github.com/go-gitea/gitea/commit/727a9e92a4b5089af805e3086d659616f4d19b4e) Merge branch 'master' into password_cannot_not_be_empty - [`34ce416`](https://github.com/go-gitea/gitea/commit/34ce4161c75a8f9925ae71f7fa7d7232dbb2aca0) Merge branch 'master' into password_cannot_not_be_empty - [`fdf2afd`](https://github.com/go-gitea/gitea/commit/fdf2afd6a5868d387a0f8f6d597e9785049ae3ed) Merge branch 'master' into password_cannot_not_be_empty - [`2d7aaf6`](https://github.com/go-gitea/gitea/commit/2d7aaf69282445c34223dc170cb08646fc88ed81) Merge branch 'master' into password_cannot_not_be_empty - [`bf7b966`](https://github.com/go-gitea/gitea/commit/bf7b966a4980ae3aacb98e8f1ddb737ce556bb0c) Merge branch 'master' into password_cannot_not_be_empty - [`baa8e72`](https://github.com/go-gitea/gitea/commit/baa8e72e527da4193e75e1b56364b8983ff92fb6) Merge branch 'master' into password_cannot_not_be_empty - [`463ce8a`](https://github.com/go-gitea/gitea/commit/463ce8a250ac718651fe89294c608b437a27c357) Merge branch 'master' into password_cannot_not_be_empty - [`9170e91`](https://github.com/go-gitea/gitea/commit/9170e913f6417b77814d5611a833955810e79320) Merge branch 'master' into password_cannot_not_be_empty ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+5 -0) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 14:11:08 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17576