Skip to content
  • Taylor Blau's avatar
    upload-pack: disallow object-info capability by default · 8c735b11
    Taylor Blau authored and Junio C Hamano's avatar Junio C Hamano committed
    We added an "object-info" capability to the v2 upload-pack protocol in
    a2ba162c (object-info: support for retrieving object info,
    2021-04-20). In the almost 3 years since, we have not added any
    client-side support, and it does not appear to exist in other
    implementations either (JGit understands the verb on the server side,
    but not on the client side).
    
    Since this largely unused code is accessible over the network by
    default, it increases the attack surface of upload-pack. I don't know of
    any particularly severe problem, but one issue is that because of the
    request/response nature of the v2 protocol, it will happily read an
    unbounded number of packets, adding each one to a string list (without
    regard to whether they are objects we know about, duplicates, etc).
    
    This may be something we want to improve in the long run, but in the
    short term it makes sense to disable the feature entirely. We'll add a
    config option as an escape hatch for anybody who w...
    8c735b11