Merge branch 'bc/allow-upload-pack-from-other-people'
Loosen overly strict ownership check introduced in the recent past, to keep the promise "cloning a suspicious repository is a safe first step to inspect it". * bc/allow-upload-pack-from-other-people: Allow cloning from repositories owned by another user
This commit is contained in:
6
daemon.c
6
daemon.c
@ -152,6 +152,7 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
|
||||
size_t rlen;
|
||||
const char *path;
|
||||
const char *dir;
|
||||
unsigned enter_repo_flags;
|
||||
|
||||
dir = directory;
|
||||
|
||||
@ -242,14 +243,15 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
|
||||
dir = rpath;
|
||||
}
|
||||
|
||||
path = enter_repo(dir, strict_paths);
|
||||
enter_repo_flags = strict_paths ? ENTER_REPO_STRICT : 0;
|
||||
path = enter_repo(dir, enter_repo_flags);
|
||||
if (!path && base_path && base_path_relaxed) {
|
||||
/*
|
||||
* if we fail and base_path_relaxed is enabled, try without
|
||||
* prefixing the base path
|
||||
*/
|
||||
dir = directory;
|
||||
path = enter_repo(dir, strict_paths);
|
||||
path = enter_repo(dir, enter_repo_flags);
|
||||
}
|
||||
|
||||
if (!path) {
|
||||
|
Reference in New Issue
Block a user