fix POST /{owner}/{repo}/comments/{id}/reactions/{action}

(cherry picked from commit 21d4556cbeb9d0f825398114ba3a4816f331315b)
This commit is contained in:
Loïc Dachary 2023-11-02 17:03:48 +01:00
parent f483ce7aa2
commit 76ded28958
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -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 {