Skip to content
Snippets Groups Projects
Select Git revision
  • todo
  • master default
  • maint
  • pu
  • next
  • v2.21.0
  • v2.21.0-rc2
  • v2.21.0-rc1
  • v2.21.0-rc0
  • v2.20.1
  • v2.20.0
  • v2.20.0-rc2
  • v2.20.0-rc1
  • v2.19.2
  • v2.20.0-rc0
  • v2.19.1
  • v2.18.1
  • v2.17.2
  • v2.16.5
  • v2.15.3
  • v2.14.5
  • v2.19.0
  • v2.19.0-rc2
  • v2.19.0-rc1
  • v2.19.0-rc0
25 results

upload-pack.c

  • Jonathan Nieder's avatar
    c7620bd0
    upload-pack: disable object filtering when disabled by config · c7620bd0
    Jonathan Nieder authored
    
    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.
    
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c7620bd0
    History
    upload-pack: disable object filtering when disabled by config
    Jonathan Nieder authored
    
    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.
    
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>