forked from kevadesu/forgejo
Fix missing check (#28406)
This commit is contained in:
parent
aeb383025f
commit
9a99c17a14
2 changed files with 24 additions and 4 deletions
|
@ -90,6 +90,12 @@ func IssuePinMove(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if issue.RepoID != ctx.Repo.Repository.ID {
|
||||
ctx.Status(http.StatusNotFound)
|
||||
log.Error("Issue does not belong to this repository")
|
||||
return
|
||||
}
|
||||
|
||||
err = issue.MovePin(ctx, form.Position)
|
||||
if err != nil {
|
||||
ctx.Status(http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue