Diff options
Diffstat (limited to 'source/ui-stats.c')
| -rw-r--r-- | source/ui-stats.c | 6 |
1 file changed, 1 insertion, 5 deletions
diff --git a/source/ui-stats.c b/source/ui-stats.c index 83a4ee9..a0ad442 100644 --- a/source/ui-stats.c +++ b/source/ui-stats.c @@ -409,12 +409,8 @@ void cgit_show_stats(void) cgit_print_error_page(400, "Bad Request", "Statistics type disabled: %s", period->name); return; } - // A leading colon makes git read the path as a pathspec with magic, - // which can end the request inside git. - if (ctx.qry.path && ctx.qry.path[0] == ':') { - cgit_print_error_page(400, "Bad Request", "Invalid path"); + if (cgit_refuse_pathspec_magic(ctx.qry.path)) return; - } if (collect_stats(period, &authors)) return; QSORT(authors.items, authors.nr, cmp_total_commits); |
