Skip to content

contain loose ref names within the ref store in refpath#2212

Closed
netliomax25-code wants to merge 1 commit into
jelmer:mainfrom
netliomax25-code:refpath-contain-ref-store
Closed

contain loose ref names within the ref store in refpath#2212
netliomax25-code wants to merge 1 commit into
jelmer:mainfrom
netliomax25-code:refpath-contain-ref-store

Conversation

@netliomax25-code

Copy link
Copy Markdown
Contributor

Loose ref names reach DiskRefsContainer.refpath from lookups that skip the validation the write paths get (_check_refname): read_loose_ref, follow's resolved symref target, and git-upload-archive's client-supplied argument in server.py. os.path.join honors .. and absolute names, so resolving a name like ../../secret reads a file outside the ref store and hands back its first line as the ref value. Enforce containment in refpath so every read and write site is covered at the one chokepoint.

@netliomax25-code netliomax25-code requested a review from jelmer as a code owner June 2, 2026 06:35
@jelmer

jelmer commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Addressed in #2234

@jelmer jelmer closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants