1. 06 May, 2021 1 commit
  2. 28 Apr, 2021 1 commit
    • path: introduce ondisk and workdir path validation · dc1ba018
      Introduce `git_path_validate_filesystem` which validates (absolute) on-disk
      paths and `git_path_validate_workdir` to perform validations on (absolute)
      working directory paths.  These functions are useful as there may be system
      limitations on on-disk paths, particularly on Windows (for example,
      enforcing MAX_PATH).
      
      For working directory paths, these limitations may be per-repository, based
      on the `core.longpaths` configuration setting.
      Edward Thomson committed
  3. 14 Apr, 2021 1 commit
  4. 10 Dec, 2019 1 commit
  5. 13 Jun, 2019 1 commit
    • path: only treat paths starting with '\' as absolute on Win32 · f7c6795f
      Windows-based systems treat paths starting with '\' as absolute,
      either referring to the current drive's root (e.g. "\foo" might
      refer to "C:\foo") or to a network path (e.g. "\\host\foo"). On
      the other hand, (most?) systems that are not based on Win32
      accept backslashes as valid characters that may be part of the
      filename, and thus we cannot treat them to identify absolute
      paths.
      
      Change the logic to only paths starting with '\' as absolute on
      the Win32 platform. Add tests to avoid regressions and document
      behaviour.
      Patrick Steinhardt committed
  6. 10 Jun, 2018 1 commit
  7. 23 May, 2018 1 commit
  8. 17 Feb, 2016 1 commit
    • index: allow read of index w/ illegal entries · 318b825e
      Allow `git_index_read` to handle reading existing indexes with
      illegal entries.  Allow the low-level `git_index_add` to add
      properly formed `git_index_entry`s even if they contain paths
      that would be illegal for the current filesystem (eg, `AUX`).
      Continue to disallow `git_index_add_bypath` from adding entries
      that are illegal universally illegal (eg, `.git`, `foo/../bar`).
      Edward Thomson committed
  9. 20 Jan, 2015 1 commit
  10. 19 Dec, 2014 2 commits
  11. 17 Dec, 2014 1 commit
  12. 16 Dec, 2014 2 commits
    • checkout: disallow bad paths on HFS · 11d67b75
      HFS filesystems ignore some characters like U+200C.  When these
      characters are included in a path, they will be ignored for the
      purposes of comparison with other paths.  Thus, if you have a ".git"
      folder, a folder of ".git<U+200C>" will also match.  Protect our
      ".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
      Edward Thomson committed
    • checkout: disallow bad paths on win32 · a64119e3
      Disallow:
       1. paths with trailing dot
       2. paths with trailing space
       3. paths with trailing colon
       4. paths that are 8.3 short names of .git folders ("GIT~1")
       5. paths that are reserved path names (COM1, LPT1, etc).
       6. paths with reserved DOS characters (colons, asterisks, etc)
      
      These paths would (without \\?\ syntax) be elided to other paths - for
      example, ".git." would be written as ".git".  As a result, writing these
      paths literally (using \\?\ syntax) makes them hard to operate with from
      the shell, Windows Explorer or other tools.  Disallow these.
      Edward Thomson committed
  13. 17 Sep, 2014 1 commit
  14. 16 Sep, 2014 1 commit
  15. 08 Sep, 2014 1 commit
  16. 03 Sep, 2014 1 commit