1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Fix missing check (#28406)

This commit is contained in:
Lunny Xiao
2023-12-11 03:37:10 +08:00
committed by GitHub
parent aeb383025f
commit 9a99c17a14
2 changed files with 24 additions and 4 deletions

View File

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