aboutsummaryrefslogtreecommitdiffstats
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:17 -0800
committerJunio C Hamano <gitster@pobox.com>2021-01-25 14:19:17 -0800
commitc7b1aaf6d6bb5746a98831854313ca8fccea600d (patch)
treeba09f9c7df3f2eb5a690b9a39be37915aebf4b18 /fsck.c
parentMerge branch 'ab/branch-sort' (diff)
parentfsck: reject .gitmodules git:// urls with newlines (diff)
downloadgit-c7b1aaf6d6bb5746a98831854313ca8fccea600d.tar.gz
git-c7b1aaf6d6bb5746a98831854313ca8fccea600d.zip
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 'fsck.c')
-rw-r--r--fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 69d0049e4d..4b7f0b73d7 100644
--- a/fsck.c
+++ b/fsck.c
@@ -1110,7 +1110,7 @@ static int check_submodule_url(const char *url)
if (looks_like_command_line_option(url))
return -1;
- if (submodule_url_is_relative(url)) {
+ if (submodule_url_is_relative(url) || starts_with(url, "git://")) {
char *decoded;
const char *next;
int has_nl;