mirror of
https://gitee.com/gitea/gitea
synced 2025-11-07 01:50:26 +08:00
backport #28213 This PR will fix some missed checks for private repositories' data on web routes and API routes.
This commit is contained in:
@@ -325,6 +325,10 @@ func getIssueCommentSafe(ctx *context.APIContext) *issues_model.Comment {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull) {
|
||||
return nil
|
||||
}
|
||||
|
||||
comment.Issue.Repo = ctx.Repo.Repository
|
||||
|
||||
return comment
|
||||
|
||||
Reference in New Issue
Block a user