diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-10 10:04:55 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-10 10:04:55 +0900 |
| commit | 35f40385e441d5aa885f5aa813539d5ed9dc2d26 (patch) | |
| tree | 07dbb374eaef5dbdff5a0ad6369232f975acd570 /daemon.c | |
| parent | 9cd1e2e1a0350a3b6cbc4bcd268f0cbbe8c89687 (diff) | |
| parent | 0ffb5a6bf1b0fd9ce0c0b1fd9ce9fd30b89a2563 (diff) | |
| download | git-35f40385e441d5aa885f5aa813539d5ed9dc2d26.tar.gz | |
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
Diffstat (limited to 'daemon.c')
| -rw-r--r-- | daemon.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |
