Skip to content

Commit

Permalink
Remove "Assignees" and "Authors" filters from issues page
Browse files Browse the repository at this point in the history
Remove the "Assignees" and "Authors" filters from the issues page,
including the view code that fetches their data.

Especially the "Authors" filter was problematic, as it contained all 25k
users who ever wrote a bug report, including HTML to download and render
their avatar. This was basically a DOS on the browser.

See go-gitea#22549 for the upstream bug
report about this.
  • Loading branch information
drsybren committed Jan 24, 2023
1 parent 1de906e commit 8f83ca7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
27 changes: 15 additions & 12 deletions routers/web/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,21 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
ctx.Data["CommitLastStatus"] = lastStatus
ctx.Data["CommitStatuses"] = commitStatuses

// Get assignees.
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, repo)
if err != nil {
ctx.ServerError("GetAssignees", err)
return
}

ctx.Data["Posters"], err = repo_model.GetIssuePosters(ctx, repo, isPullOption.IsTrue())
if err != nil {
ctx.ServerError("GetIssuePosters", err)
return
}
// Disabled by Sybren (2023-01-24) to speed up rendering of the issues page.
// See https://github.com/go-gitea/gitea/issues/22586 for more info.
//
// // Get assignees.
// ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, repo)
// if err != nil {
// ctx.ServerError("GetAssignees", err)
// return
// }

// ctx.Data["Posters"], err = repo_model.GetIssuePosters(ctx, repo, isPullOption.IsTrue())
// if err != nil {
// ctx.ServerError("GetIssuePosters", err)
// return
// }

handleTeamMentions(ctx)
if ctx.Written() {
Expand Down
4 changes: 4 additions & 0 deletions templates/repo/issue/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
{{end}}
</div>
</div>
{{- /*
Disabled by Sybren (2023-01-24) to speed up rendering of the issues page.
See https://github.com/go-gitea/gitea/issues/22586 for more info.

<!-- Author -->
<div class="ui {{if not .Posters}}disabled{{end}} dropdown jump item">
Expand Down Expand Up @@ -132,6 +135,7 @@
{{end}}
</div>
</div>
*/ -}}

{{if .IsSigned}}
<!-- Type -->
Expand Down

0 comments on commit 8f83ca7

Please sign in to comment.