Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nil object access in some conditions when parsing cross references #8281

Merged
merged 10 commits into from
Sep 25, 2019
2 changes: 1 addition & 1 deletion models/issue_xref.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (issue *Issue) isValidCommentReference(e Engine, ctx *crossReferencesContex
return nil, err
}
// Check user permissions
if refIssue.Repo.ID != ctx.OrigIssue.Repo.ID {
if refIssue.RepoID != ctx.OrigIssue.RepoID {
perm, err := getUserRepoPermission(e, refIssue.Repo, ctx.Doer)
if err != nil {
return nil, err
Expand Down