From e9aa373db5bf33c500cd51f0db2846bf53425b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Mon, 20 Nov 2023 16:34:19 +0100 Subject: [PATCH] fix POST /{username}/{reponame}/{type:issues|pulls}/move_pin (cherry picked from commit 7eda733ed6a22c08a85fdc90deec0c440427cef7) --- routers/web/repo/issue_pin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/web/repo/issue_pin.go b/routers/web/repo/issue_pin.go index bbfeaee6e8..977744b52d 100644 --- a/routers/web/repo/issue_pin.go +++ b/routers/web/repo/issue_pin.go @@ -89,6 +89,10 @@ func IssuePinMove(ctx *context.Context) { log.Error(err.Error()) return } + if issue.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{}) + return + } err = issue.MovePin(ctx, form.Position) if err != nil {