diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-05-15 13:59:03 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-05-15 13:59:03 -0700 |
| commit | fa889347e3c26dc49963b4261a5231e9c158599f (patch) | |
| tree | 57cd58a08573a9d566f5e7aa941d54237b2e4758 /setup.c | |
| parent | Merge branch 'mc/send-email-header-cmd' (diff) | |
| parent | setup: trace bare repository setups (diff) | |
| download | git-fa889347e3c26dc49963b4261a5231e9c158599f.tar.gz git-fa889347e3c26dc49963b4261a5231e9c158599f.zip | |
Merge branch 'gc/trace-bare-repo-setup'
The tracing mechanism learned to notice and report when
auto-discovered bare repositories are being used, as allowing so
without explicitly stating the user intends to do so (with setting
GIT_DIR for example) can be used with social engineering as an
attack vector.
* gc/trace-bare-repo-setup:
setup: trace bare repository setups
Diffstat (limited to 'setup.c')
| -rw-r--r-- | setup.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1352,6 +1352,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir, } if (is_git_directory(dir->buf)) { + trace2_data_string("setup", NULL, "implicit-bare-repository", dir->buf); if (get_allowed_bare_repo() == ALLOWED_BARE_REPO_EXPLICIT) return GIT_DIR_DISALLOWED_BARE; if (!ensure_valid_ownership(NULL, NULL, dir->buf, report)) |
