summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index fd7ffe1840..0e8e05d83a 100644
--- a/connect.c
+++ b/connect.c
@@ -754,6 +754,9 @@ struct child_process *git_connect(int fd[2], const char *url,
return NULL;
}
+ if (ssh_host[0] == '-')
+ die("strange hostname '%s' blocked", ssh_host);
+
ssh = getenv("GIT_SSH_COMMAND");
if (!ssh) {
const char *base;