X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=connect.c;h=9c97fee43031056dff2beb2a8fe9ed882e476c2d;hb=8c2462d1fe01fbc509827591f6b287d8af245ae1;hp=8b8f56cf6d230b23c46bb980755cb6d1fc3684ef;hpb=e082a85708e70a04bbdd8fbb23ad81643b7be280;p=thirdparty%2Fgit.git diff --git a/connect.c b/connect.c index 8b8f56cf6d..9c97fee430 100644 --- a/connect.c +++ b/connect.c @@ -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