Diff options
Diffstat (limited to 'source/ui-log.c')
-rw-r--r--source/ui-log.c6
1 file changed, 1 insertion, 5 deletions
diff --git a/source/ui-log.c b/source/ui-log.c
index 4bb4b06..128c01f 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -479,12 +479,8 @@ void cgit_print_log(const char *tip, int ofs, int cnt, const char *grep, const c
}
strvec_push(&rev_argv, tip);
- // A leading colon makes git read the path as a pathspec with magic,
- // which can end the request inside git.
- if (path && path[0] == ':') {
- cgit_print_error_page(400, "Bad Request", "Invalid path");
+ if (cgit_refuse_pathspec_magic(path))
goto out;
- }
if (grep && pattern && *pattern) {
if (!strcmp(grep, "grep") || !strcmp(grep, "author") || !strcmp(grep, "committer")) {