-
Name Previous Value Current Value Assignee
robin
wh
-
Fixed in pr #84.
Git LFS locks are now scoped per project: create/list/verify/unlock all filter by repository, and unlock rejects locks that belong to another project. Existing locks are removed during upgrade because they were not associated with a project and cannot be migrated reliably.
-
-
State changed as build OD-7736 (16.2.0) is successful
-
OneDev
changed state to 'Closed' 1 week ago
Previous Value Current Value Open
Closed
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
16.1.0
|
| Labels |
No labels
|
Issue Votes (0)
Summary
Git LFS file locks created in one project are visible in (and affect) every other project on the same OneDev instance. The LFS File Locking API is specified per repository, but OneDev appears to keep a single instance-wide lock store.
Spec reference: https://github.com/git-lfs/git-lfs/blob/main/docs/api/locking.md (lock endpoints are defined relative to a repository's LFS endpoint, i.e.
<repo>.git/info/lfs/locks).Steps to reproduce
Tested with OneDev 16.1.0 (
1dev/server:latest, release date 2026-07-16, commit140e1958) in Docker, unattended setup:lock-aandlock-b(via UI orPOST /~api/projects), push an initial commit to each.lock-aonly:Actual result
Both endpoints return the same lock with the same id:
The same behavior is visible with the plain git-lfs client (
git lfs locksinside a clone oflock-bshows locks created inlock-aand in any other project of the instance). Observed on a production instance running 14.1.9 as well.Expected result
lock-breturns an empty lock list. Locks must be scoped to the repository whose LFS endpoint they were created on:git lfs locks/ lock verification (lfs.locksverify) in one repository must not be influenced by locks of other repositories.Impact
Any workflow that relies on LFS file locking (e.g. exclusive check-out of binary files) breaks as soon as more than one repository on the instance uses the same relative paths - which is the normal case when repositories share a common directory layout. Locks from unrelated (even private) projects also leak into every project's lock listing, which is a minor information disclosure issue as well.