git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] upload-pack: disable object filtering when disabled by config

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2018, 22:12 UTC
Message-ID
<xmqqo9j77sub.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180328203303.GA260688@aiede.svl.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 26 quoted lines
> When upload-pack gained partial clone support (v2.17.0-rc0~132^2~12,
> 2017-12-08), it was guarded by the uploadpack.allowFilter config item
> to allow server operators to control when they start supporting it.
>
> That config item didn't go far enough, though: it controls whether the
> 'filter' capability is advertised, but if a (custom) client ignores
> the capability advertisement and passes a filter specification anyway,
> the server would handle that despite allowFilter being false.
>
> This is particularly significant if a security bug is discovered in
> this new experimental partial clone code.  Installations without
> uploadpack.allowFilter ought not to be affected since they don't
> intend to support partial clone, but they would be swept up into being
> vulnerable.
>
> Simplify and limit the attack surface by making uploadpack.allowFilter
> disable the feature, not just the advertisement of it.
>
> NEEDSWORK: tests
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Noticed while reviewing the corresponding JGit code.
>
> If this change seems like a good idea, I can add tests and re-send it
> for real.

Yup. The names of the static variables tell almost the whole story to convince me why this is a good change ;-). It is not about advertising a feature alone, but if the feature is actually enabled, so advertisement and handling of the feature should be either both enabled or disabled.

Thanks.
Previous: Jonathan NiederNext: Jeff Hostetler
Message 2 of 8 in “upload-pack: disable object filtering when disabled by config”
  1. upload-pack: disable object filtering when disabled by configJonathan Nieder, Mar 28, 2018
  2. Junio C HamanoMar 28, 2018
  3. Jeff HostetlerMar 29, 2018
  4. Jeff KingMar 29, 2018
  5. Jonathan NiederMar 29, 2018
  6. Jeff KingMar 29, 2018
  7. Junio C HamanoMar 29, 2018
  8. Junio C HamanoMar 30, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.