1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-18 08:18:35 +00:00

Support slashes in release tags (#12864) (#12882)

Backport #12864

Fix #12861

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath
2020-09-17 21:33:48 +01:00
committed by GitHub
parent 62a3c847cd
commit d624e91c0c
2 changed files with 3 additions and 3 deletions

View File

@@ -814,9 +814,9 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/:username/:reponame", func() {
m.Group("/releases", func() {
m.Get("/", repo.Releases)
m.Get("/tag/:tag", repo.SingleRelease)
m.Get("/tag/*", repo.SingleRelease)
m.Get("/latest", repo.LatestRelease)
}, repo.MustBeNotEmpty, context.RepoRef())
}, repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag))
m.Group("/releases", func() {
m.Get("/new", repo.NewRelease)
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)