]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-snapshot.c
ui-snapshot: filter permitted snapshot requests
[ps-cgit] / ui-snapshot.c
index b9e2a36f9dd57a475c364437c7de82d487986565..abf83995011075db6668810a8df3da993fc109d5 100644 (file)
@@ -194,7 +194,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
        }
 
        f = get_format(filename);
-       if (!f) {
+       if (!f || !(ctx.repo->snapshots & f->bit)) {
                cgit_print_error_page(400, "Bad request",
                                "Unsupported snapshot format: %s", filename);
                return;