Skip to content
  • Christian Couder's avatar
    list-objects-filter: disable 'sparse:path' filters · e693237e
    Christian Couder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    If someone wants to use as a filter a sparse file that is in the
    repository, something like "--filter=sparse:oid=<ref>:<path>"
    already works.
    
    So 'sparse:path' is only interesting if the sparse file is not in
    the repository. In this case though the current implementation has
    a big security issue, as it makes it possible to ask the server to
    read any file, like for example /etc/password, and to explore the
    filesystem, as well as individual lines of files.
    
    If someone is interested in using a sparse file that is not in the
    repository as a filter, then at the minimum a config option, such
    as "uploadpack.sparsePathFilter", should be implemented first to
    restrict the directory from which the files specified by
    'sparse:path' can be read.
    
    For now though, let's just disable 'sparse:path' filters.
    
    Helped-by: default avatarMatthew DeVore <matvore@google.com>
    Helped-by: default avatarJeff Hostetler <git@jeffhostetler.com>
    Signed-off-by: default avatarChristian Couder <chriscool@tuxfamily.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    e693237e