Skip to content

serve: reject valueless promisor-remote capability - #2199

Open
newren wants to merge 1 commit into
gitgitgadget:masterfrom
newren:promisor-remote-require-argument
Open

serve: reject valueless promisor-remote capability#2199
newren wants to merge 1 commit into
gitgitgadget:masterfrom
newren:promisor-remote-require-argument

Conversation

@newren

@newren newren commented Aug 11, 2026

Copy link
Copy Markdown

No description provided.

d460267 (Add 'promisor-remote' capability to protocol v2,
2025-02-18) added a receive callback which passes the capability value
directly to mark_promisor_remotes_as_accepted(). However, a client can
send the capability name without an '=' or value, in which case
get_capability() supplies NULL and strbuf_split_str() dereferences it.

Reject the missing argument before parsing it, and add a test covering
this case.

Signed-off-by: Elijah Newren <newren@gmail.com>
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.

1 participant