1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 17:14:27 +00:00

Merge pull request #2548 from fnkr/fix-unescaped-regex

Escape unescaped periods in route regular expression
This commit is contained in:
Unknwon 2016-02-02 13:30:08 -05:00
commit 452bc385fe

View File

@ -516,7 +516,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/forks", repo.Forks)
}, middleware.RepoRef())
m.Get("/compare/:before([a-z0-9]{40})...:after([a-z0-9]{40})", repo.CompareDiff)
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff)
}, ignSignIn, middleware.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars)