Commit 1728e27c by Edward Thomson

path: length validation respecting core.longpaths

Teach `git_path_is_valid` to respect `core.longpaths`.  Add helper
methods to validate length and set the error message appropriately.
parent 315a43b2
...@@ -285,6 +285,28 @@ GIT_INLINE(unsigned int) dotgit_flags( ...@@ -285,6 +285,28 @@ GIT_INLINE(unsigned int) dotgit_flags(
return flags; return flags;
} }
GIT_INLINE(unsigned int) length_flags(
git_repository *repo,
unsigned int flags)
{
#ifdef GIT_WIN32
int allow = 0;
if (repo &&
git_repository__configmap_lookup(&allow, repo, GIT_CONFIGMAP_LONGPATHS) < 0)
allow = 0;
if (allow)
flags &= ~GIT_FS_PATH_REJECT_LONG_PATHS;
#else
GIT_UNUSED(repo);
flags &= ~GIT_FS_PATH_REJECT_LONG_PATHS;
#endif
return flags;
}
bool git_path_str_is_valid( bool git_path_str_is_valid(
git_repository *repo, git_repository *repo,
const git_str *path, const git_str *path,
...@@ -297,6 +319,10 @@ bool git_path_str_is_valid( ...@@ -297,6 +319,10 @@ bool git_path_str_is_valid(
if ((flags & GIT_PATH_REJECT_DOT_GIT)) if ((flags & GIT_PATH_REJECT_DOT_GIT))
flags = dotgit_flags(repo, flags); flags = dotgit_flags(repo, flags);
/* Update the length checks based on platform */
if ((flags & GIT_FS_PATH_REJECT_LONG_PATHS))
flags = length_flags(repo, flags);
data.repo = repo; data.repo = repo;
data.file_mode = file_mode; data.file_mode = file_mode;
data.flags = flags; data.flags = flags;
......
...@@ -41,4 +41,28 @@ GIT_INLINE(bool) git_path_is_valid( ...@@ -41,4 +41,28 @@ GIT_INLINE(bool) git_path_is_valid(
return git_path_str_is_valid(repo, &str, file_mode, flags); return git_path_str_is_valid(repo, &str, file_mode, flags);
} }
GIT_INLINE(int) git_path_validate_str_length(
git_repository *repo,
const git_str *path)
{
if (!git_path_str_is_valid(repo, path, 0, GIT_FS_PATH_REJECT_LONG_PATHS)) {
if (path->size == SIZE_MAX)
git_error_set(GIT_ERROR_FILESYSTEM, "path too long: '%s'", path->ptr);
else
git_error_set(GIT_ERROR_FILESYSTEM, "path too long: '%.*s'", (int)path->size, path->ptr);
return -1;
}
return 0;
}
GIT_INLINE(int) git_path_validate_length(
git_repository *repo,
const char *path)
{
git_str str = GIT_STR_INIT_CONST(path, SIZE_MAX);
return git_path_validate_str_length(repo, &str);
}
#endif #endif
#include "clar_libgit2.h" #include "clar_libgit2.h"
#include "fs_path.h" #include "fs_path.h"
#include "path.h"
void test_path_core__cleanup(void) void test_path_core__cleanup(void)
{ {
...@@ -281,30 +282,30 @@ void test_path_core__isvalid_nt_chars(void) ...@@ -281,30 +282,30 @@ void test_path_core__isvalid_nt_chars(void)
void test_path_core__validate_workdir(void) void test_path_core__validate_workdir(void)
{ {
cl_must_pass(git_fs_path_validate_workdir(NULL, "/foo/bar")); cl_must_pass(git_path_validate_length(NULL, "/foo/bar"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "C:\\Foo\\Bar")); cl_must_pass(git_path_validate_length(NULL, "C:\\Foo\\Bar"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "\\\\?\\C:\\Foo\\Bar")); cl_must_pass(git_path_validate_length(NULL, "\\\\?\\C:\\Foo\\Bar"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "\\\\?\\C:\\Foo\\Bar")); cl_must_pass(git_path_validate_length(NULL, "\\\\?\\C:\\Foo\\Bar"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "\\\\?\\UNC\\server\\C$\\folder")); cl_must_pass(git_path_validate_length(NULL, "\\\\?\\UNC\\server\\C$\\folder"));
#ifdef GIT_WIN32 #ifdef GIT_WIN32
/* /*
* In the absense of a repo configuration, 259 character paths * In the absense of a repo configuration, 259 character paths
* succeed. >= 260 character paths fail. * succeed. >= 260 character paths fail.
*/ */
cl_must_pass(git_fs_path_validate_workdir(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaa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aaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\260.txt"));
cl_must_fail(git_fs_path_validate_workdir(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\longer_than_260.txt")); cl_must_fail(git_path_validate_length(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\longer_than_260.txt"));
/* count characters, not bytes */ /* count characters, not bytes */
cl_must_pass(git_fs_path_validate_workdir(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaa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/aaaaaaaaa/aaaaaaaaa/260.txt")); cl_must_pass(git_path_validate_length(NULL, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/260.txt"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt")); cl_must_pass(git_path_validate_length(NULL, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt"));
cl_must_pass(git_fs_path_validate_workdir(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaa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aaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\xc2\xa2\\long.txt"));
#endif #endif
} }
...@@ -320,15 +321,15 @@ void test_path_core__validate_workdir_with_core_longpath(void) ...@@ -320,15 +321,15 @@ void test_path_core__validate_workdir_with_core_longpath(void)
cl_git_pass(git_repository_config(&config, repo)); cl_git_pass(git_repository_config(&config, repo));
/* fail by default */ /* fail by default */
cl_must_fail(git_fs_path_validate_workdir(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt")); cl_must_fail(git_path_validate_length(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt"));
/* set core.longpaths explicitly on */ /* set core.longpaths explicitly on */
cl_git_pass(git_config_set_bool(config, "core.longpaths", 1)); cl_git_pass(git_config_set_bool(config, "core.longpaths", 1));
cl_must_pass(git_fs_path_validate_workdir(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt")); cl_must_pass(git_path_validate_length(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt"));
/* set core.longpaths explicitly off */ /* set core.longpaths explicitly off */
cl_git_pass(git_config_set_bool(config, "core.longpaths", 0)); cl_git_pass(git_config_set_bool(config, "core.longpaths", 0));
cl_must_fail(git_fs_path_validate_workdir(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt")); cl_must_fail(git_path_validate_length(repo, "/c/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/aaaaaaaaa/longer_than_260.txt"));
git_config_free(config); git_config_free(config);
git_repository_free(repo); git_repository_free(repo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment