upload-pack: disable object filtering when disabled by config
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: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9f242a1336
commit
c7620bd0f3
@ -3270,7 +3270,7 @@ uploadpack.packObjectsHook::
|
||||
stdout.
|
||||
|
||||
uploadpack.allowFilter::
|
||||
If this option is set, `upload-pack` will advertise partial
|
||||
If this option is set, `upload-pack` will support partial
|
||||
clone and partial fetch object filtering.
|
||||
+
|
||||
Note that this configuration variable is ignored if it is seen in the
|
||||
|
Reference in New Issue
Block a user