Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow verify_path() failures from fast-import #1832

Open
wants to merge 1 commit into
base: en/fast-import-path-sanitize
Choose a base branch
from

Commits on Nov 28, 2024

  1. fast-import: disallow more path components

    Instead of just disallowing '.' and '..', make use of verify_path() to
    ensure that fast-import will disallow anything we wouldn't allow into
    the index, such as anything under .git/, .gitmodules as a symlink, or
    a dos drive prefix on Windows.
    
    Since a few fast-export and fast-import tests that tried to stress-test
    the correct handling of quoting relied on filenames that fail
    is_valid_win32_path(), such as spaces or periods at the end of filenames
    or backslashes within the filename, turn off core.protectNTFS for those
    tests to ensure they keep passing.
    
    Helped-by: Jeff King <peff@peff.net>
    Signed-off-by: Elijah Newren <newren@gmail.com>
    newren committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    787e9d7 View commit details
    Browse the repository at this point in the history