From 08f9e5632da83aae9866f0805e8879fa7039c7b0 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:38:24 -0700 Subject: Refuse pathspec magic through one helper --- source/ui-atom.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source/ui-atom.c') diff --git a/source/ui-atom.c b/source/ui-atom.c index c9194f6..b9762b1 100644 --- a/source/ui-atom.c +++ b/source/ui-atom.c @@ -160,13 +160,8 @@ void cgit_print_atom(char *tip, const char *path, int max_count) int argc = 2; bool need_updated = true; - // A leading colon makes git read the path as a pathspec with magic, - // which can end the request inside git, so the feed refuses it as the - // log does. - if (path && path[0] == ':') { - cgit_print_error_page(400, "Bad Request", "Invalid path"); + if (cgit_refuse_pathspec_magic(path)) return; - } if (ctx.qry.show_all) argv[1] = "--all"; -- cgit