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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user