diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-26 01:19:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-26 01:19:17 +0300 |
commit | c7b1aaf6d6bb5746a98831854313ca8fccea600d (patch) | |
tree | ba09f9c7df3f2eb5a690b9a39be37915aebf4b18 /connect.c | |
parent | 9e409d7e0762ff55c2787b4a106bf80ab2d57471 (diff) | |
parent | 6aed56736b882f94c81293d1646d27d10241349c (diff) |
Merge branch 'jk/forbid-lf-in-git-url'
Newline characters in the host and path part of git:// URL are
now forbidden.
* jk/forbid-lf-in-git-url:
fsck: reject .gitmodules git:// urls with newlines
git_connect_git(): forbid newlines in host and path
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1160,6 +1160,8 @@ static struct child_process *git_connect_git(int fd[2], char *hostandport, target_host = xstrdup(hostandport); transport_check_allowed("git"); + if (strchr(target_host, '\n') || strchr(path, '\n')) + die(_("newline is forbidden in git:// hosts and repo paths")); /* * These underlying connection commands die() if they |