From 76ded289586f12ba8539c7d46adfa470af8ccfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Thu, 2 Nov 2023 17:03:48 +0100 Subject: [PATCH] fix POST /{owner}/{repo}/comments/{id}/reactions/{action} (cherry picked from commit 21d4556cbeb9d0f825398114ba3a4816f331315b) --- routers/web/repo/issue.go | 5 +++++ 1 file changed, 5 insertions(+) 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 {