aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2019-11-25 01:06:23 +0200
committerGitHub <noreply@github.com>2019-11-25 01:06:23 +0200
commit95c3dc856a7d4199232549e3b4d76769ef868bda (patch)
tree40eed5392b00881f5e0e078012cc11e24637913c /modules/auth
parente8241bf55e0ff683933f9c7b51b8ee5956965bdf (diff)
downloadgitea-95c3dc856a7d4199232549e3b4d76769ef868bda.tar.gz
gitea-95c3dc856a7d4199232549e3b4d76769ef868bda.zip
Fix max length check and limit in multiple repo forms (#9148)
* Fix input field max length for release, label and milestone forms * Add max length for isseu and PR title
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/repo_form.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 1ca9dd1de9..dd4f83478b 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -507,9 +507,9 @@ func (f SubmitReviewForm) HasEmptyContent() bool {
// NewReleaseForm form for creating release
type NewReleaseForm struct {
- TagName string `binding:"Required;GitRefName"`
- Target string `form:"tag_target" binding:"Required"`
- Title string `binding:"Required"`
+ TagName string `binding:"Required;GitRefName;MaxSize(255)"`
+ Target string `form:"tag_target" binding:"Required;MaxSize(255)"`
+ Title string `binding:"Required;MaxSize(255)"`
Content string
Draft string
Prerelease bool
@@ -523,7 +523,7 @@ func (f *NewReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
// EditReleaseForm form for changing release
type EditReleaseForm struct {
- Title string `form:"title" binding:"Required"`
+ Title string `form:"title" binding:"Required;MaxSize(255)"`
Content string `form:"content"`
Draft string `form:"draft"`
Prerelease bool `form:"prerelease"`