LFS locks must belong to the intended repo (#36344) (#36349)

Backport #36344 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
GiteabotandLunny Xiao authored and GitHub committed 2026-01-12 09:09:16 +02:00
1 parent 83ce45b186
commit 2c778ff067
3 files changed
+87 -5

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ func GetListLockHandler(ctx *context.Context) {
})
return
}
lock, err := git_model.GetLFSLockByID(ctx, v)
lock, err := git_model.GetLFSLockByIDAndRepo(ctx, v, repository.ID)
if err != nil && !git_model.IsErrLFSLockNotExist(err) {
log.Error("Unable to get lock with ID[%s]: Error: %v", v, err)
}