Skip to content

Commit e1d9bcb

Browse files
author
Gusted
committed
Add generic check
1 parent 291adce commit e1d9bcb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/web/repo/issue.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,10 @@ func getActionIssues(ctx *context.Context) []*issues_model.Issue {
17841784
issueUnitEnabled := ctx.Repo.CanRead(unit.TypeIssues)
17851785
prUnitEnabled := ctx.Repo.CanRead(unit.TypePullRequests)
17861786
for _, issue := range issues {
1787+
if issue.RepoID != ctx.Repo.Repository.ID {
1788+
ctx.NotFound("some issue's RepoID is incorrect", errors.New("some issue's RepoID is incorrect"))
1789+
return nil
1790+
}
17871791
if issue.IsPull && !prUnitEnabled || !issue.IsPull && !issueUnitEnabled {
17881792
ctx.NotFound("IssueOrPullRequestUnitNotAllowed", nil)
17891793
return nil

0 commit comments

Comments
 (0)