diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 9f78cb8e0a..c58e1f7a79 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -2971,6 +2971,11 @@ func UpdateCommentContent(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.CanWriteIssuesOrPulls(comment.Issue.IsPull)) { ctx.Error(http.StatusForbidden) return