aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2018-06-04 07:34:44 +0200
committerLauris BH <lauris@nix.lv>2018-06-04 08:34:44 +0300
commit1f877f8c875891d3647c9a6413abc02aa5787109 (patch)
tree176b0f9113b9ec36040cac5aea7e714634b55d40 /modules
parentfb1daad13d26f34617e91891b45617471ffb5520 (diff)
downloadgitea-1f877f8c875891d3647c9a6413abc02aa5787109.tar.gz
gitea-1f877f8c875891d3647c9a6413abc02aa5787109.zip
Add tag check to release draft creation (#3729)
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/repo_form.go2
-rw-r--r--modules/validation/binding.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index e3471fff5d..4ea1ba90ec 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -371,7 +371,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
// NewReleaseForm form for creating release
type NewReleaseForm struct {
- TagName string `binding:"Required"`
+ TagName string `binding:"Required;GitRefName"`
Target string `form:"tag_target" binding:"Required"`
Title string `binding:"Required"`
Content string
diff --git a/modules/validation/binding.go b/modules/validation/binding.go
index 3f671890b6..7aaed59c12 100644
--- a/modules/validation/binding.go
+++ b/modules/validation/binding.go
@@ -19,7 +19,7 @@ const (
)
var (
- // GitRefNamePattern is regular expression wirh unallowed characters in git reference name
+ // GitRefNamePattern is regular expression with unallowed characters in git reference name
GitRefNamePattern = regexp.MustCompile("[^\\d\\w-_\\./]")
)