Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/http-backend.c b/http-backend.c
index 646e9108bd..f8ea9d7faa 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -559,7 +559,13 @@ static char* getdir(void)
if (root && *root) {
if (!pathinfo || !*pathinfo)
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
+ if (daemon_avoid_alias(pathinfo))
+ die("'%s': aliased", pathinfo);
strbuf_addstr(&buf, root);
+ if (buf.buf[buf.len - 1] != '/')
+ strbuf_addch(&buf, '/');
+ if (pathinfo[0] == '/')
+ pathinfo++;
strbuf_addstr(&buf, pathinfo);
return strbuf_detach(&buf, NULL);
} else if (path && *path) {