Skip to content

Commit 1621087

Browse files
emmax86ethomson
authored andcommitted
Unescape repo before constructing ssh request
1 parent 8a2cdbd commit 1621087

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/transports/ssh.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,19 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url)
8989
return -1;
9090
}
9191

92+
repo = gitno_unescape(git__strdup(repo));
93+
9294
len = strlen(cmd) + 1 /* Space */ + 1 /* Quote */ + strlen(repo) + 1 /* Quote */ + 1;
9395

9496
git_buf_grow(request, len);
9597
git_buf_printf(request, "%s '%s'", cmd, repo);
9698
git_buf_putc(request, '\0');
9799

100+
git__free(repo);
101+
98102
if (git_buf_oom(request))
99103
return -1;
100-
104+
101105
return 0;
102106
}
103107

0 commit comments

Comments
 (0)