summaryrefslogtreecommitdiffstats
path: root/routers/web/goget.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-08-11 17:08:52 +0200
committerGitHub <noreply@github.com>2021-08-11 18:08:52 +0300
commitf1a810e0901b80eb6bc21103434fc0737af17eaa (patch)
tree9656d780cf19fd745f41eef0012701458aa271c4 /routers/web/goget.go
parent2d25b7d44bedf8f17cc2b49f39d1cee662b199a5 (diff)
downloadgitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.tar.gz
gitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.zip
Related refactors to ctx.FormX functions (#16567)
* use FormTrim if posible * speedup goGet * only convert if nessesary
Diffstat (limited to 'routers/web/goget.go')
-rw-r--r--routers/web/goget.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/goget.go b/routers/web/goget.go
index 02adf9c5ea..9f367a9277 100644
--- a/routers/web/goget.go
+++ b/routers/web/goget.go
@@ -18,7 +18,7 @@ import (
)
func goGet(ctx *context.Context) {
- if ctx.Req.Method != "GET" || ctx.FormString("go-get") != "1" || len(ctx.Req.URL.Query()) > 1 {
+ if ctx.Req.Method != "GET" || len(ctx.Req.URL.RawQuery) < 8 || ctx.FormString("go-get") != "1" {
return
}