1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-02 20:38:26 +00:00

Fix missing check (#28406) (#28411)

Backport #28406 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2023-12-11 09:10:48 +08:00
committed by GitHub
parent 46beb7f33f
commit cd2dd5a67d
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)