Prevent double decoding of % in url params (#17997) (#18001)

This commit is contained in:
zeripath 2021-12-16 23:03:20 +00:00 committed by GitHub
parent fc8c23edb7
commit 3a77465e4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 47 additions and 7 deletions

View file

@ -833,7 +833,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
setting.AppSubURL,
strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*")),
ctx.Repo.BranchNameSubURL(),
ctx.Repo.TreePath))
util.PathEscapeSegments(ctx.Repo.TreePath)))
return
}
}