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

This commit is contained in:
Lunny Xiao
2026-01-11 02:57:58 -08:00
committed by GitHub
parent 8319d8f381
commit da036f3f35
3 changed files with 87 additions and 5 deletions

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