summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authormrsdizzie <info@mrsdizzie.com>2019-05-31 05:21:15 -0400
committerzeripath <art27@cantab.net>2019-05-31 10:21:15 +0100
commitde6ef14d04c36272143ad822bf5903f84c7f238b (patch)
treeb22bbf05e883fc935e7c265a827edd591dabcbdd /routers
parent592924a34b8e671c93416c01a468b9aab0ab39aa (diff)
downloadgitea-de6ef14d04c36272143ad822bf5903f84c7f238b.tar.gz
gitea-de6ef14d04c36272143ad822bf5903f84c7f238b.zip
Validate External Tracker URL Format (#7089)
* Validate External Tracker URL Format Add some validation checks for external tracker URL format. Fixes #7068 * Don't make {index} a hard requirement * Fix Description * make fmt * move regex to package level * fix copyright date
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index 07649982d2..767cdacde0 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -249,7 +249,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
ctx.Redirect(repo.Link() + "/settings")
return
}
- if len(form.TrackerURLFormat) != 0 && !validation.IsValidExternalURL(form.TrackerURLFormat) {
+ if len(form.TrackerURLFormat) != 0 && !validation.IsValidExternalTrackerURLFormat(form.TrackerURLFormat) {
ctx.Flash.Error(ctx.Tr("repo.settings.tracker_url_format_error"))
ctx.Redirect(repo.Link() + "/settings")
return