diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-03 17:51:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-03 17:51:33 +0100 |
commit | 137dcbf93d0c8c6c2c7bd10ea544481a3e95e676 (patch) | |
tree | 5718e7f30d625d25a61368453830cac17a8b1e6f | |
parent | 42a744d9e61168765f97884a8efec13cd3fedff7 (diff) | |
parent | 1adde07a3fc4a43ec3d5829dc3e5ba9587584f77 (diff) | |
download | gitea-137dcbf93d0c8c6c2c7bd10ea544481a3e95e676.tar.gz gitea-137dcbf93d0c8c6c2c7bd10ea544481a3e95e676.zip |
Merge pull request #47 from 0xbaadf00d/fix/3743-route-regexp-branchname
Fix SHA and compare regex on route file [Critical]
-rw-r--r-- | cmd/web.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go index 5f92c77413..d5dae5badc 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -585,12 +585,12 @@ func runWeb(ctx *cli.Context) error { m.Get("/src/*", repo.Home) m.Get("/raw/*", repo.SingleDownload) m.Get("/commits/*", repo.RefCommits) - m.Get("/commit/:sha([a-z0-9]{7,40})$", repo.Diff) + m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.Diff) m.Get("/forks", repo.Forks) }, context.RepoRef()) - m.Get("/commit/:sha([a-z0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) + m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) - m.Get("/compare/:before([a-z0-9]{7,40})\\.\\.\\.:after([a-z0-9]{7,40})", repo.CompareDiff) + m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff) }, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare) m.Group("/:username/:reponame", func() { m.Get("/stars", repo.Stars) |