mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 05:18:29 +00:00
Address some CodeQL security concerns (#35572)
Although there is no real security problem
This commit is contained in:
@@ -35,7 +35,7 @@ type RepoSearchOptions struct {
|
||||
// This function is also used to render the Admin Repository Management page.
|
||||
func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
||||
// Sitemap index for sitemap paths
|
||||
page := int(ctx.PathParamInt64("idx"))
|
||||
page := ctx.PathParamInt("idx")
|
||||
isSitemap := ctx.PathParam("idx") != ""
|
||||
if page <= 1 {
|
||||
page = ctx.FormInt("page")
|
||||
|
||||
@@ -34,7 +34,7 @@ func isKeywordValid(keyword string) bool {
|
||||
// RenderUserSearch render user search page
|
||||
func RenderUserSearch(ctx *context.Context, opts user_model.SearchUserOptions, tplName templates.TplName) {
|
||||
// Sitemap index for sitemap paths
|
||||
opts.Page = int(ctx.PathParamInt64("idx"))
|
||||
opts.Page = ctx.PathParamInt("idx")
|
||||
isSitemap := ctx.PathParam("idx") != ""
|
||||
if opts.Page <= 1 {
|
||||
opts.Page = ctx.FormInt("page")
|
||||
|
||||
Reference in New Issue
Block a user