Skip to content

Commit 901cca5

Browse files
committed
add repo check
1 parent 17d742a commit 901cca5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

routers/api/v1/repo/issue_comment.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,15 @@ func GetIssueComment(ctx *context.APIContext) {
250250
return
251251
}
252252

253+
if err = comment.LoadIssue(); err != nil {
254+
ctx.InternalServerError(err)
255+
return
256+
}
257+
if comment.Issue.RepoID != ctx.Repo.Repository.ID {
258+
ctx.Status(http.StatusNotFound)
259+
return
260+
}
261+
253262
if comment.Type != models.CommentTypeComment {
254263
ctx.Status(http.StatusNoContent)
255264
return

0 commit comments

Comments
 (0)