diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index a0642165f7..d61c913f2f 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -3300,6 +3300,11 @@ func ChangeCommentReaction(ctx *context.Context) { return } + if comment.Issue.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{}) + return + } + if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull)) { if log.IsTrace() { if ctx.IsSigned {