Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Refuse pathspec magic through one helper
Diffstat (limited to 'source/ui-atom.c')
| -rw-r--r-- | source/ui-atom.c | 7 |
1 file changed, 1 insertion, 6 deletions
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"; |
