Escape unescaped periods in route regular expression

tokarchuk/v1.17
Florian Kaiser 9 years ago
parent 0255e6a703
commit 71bb7f6053
  1. 2
      cmd/web.go

@ -516,7 +516,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/forks", repo.Forks) m.Get("/forks", repo.Forks)
}, middleware.RepoRef()) }, 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) }, ignSignIn, middleware.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() { m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars) m.Get("/stars", repo.Stars)

Loading…
Cancel
Save