From 418c4b6dbd358573dedb4a97ecda549409ff16b5 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:05:21 -0700 Subject: Require a whole page when a filter exits early When a filter cannot run, cgit dies mid-page with its Status line already out, so the check passed with no filter at all. That is the case wherever true lives only in /bin, as on busybox. true now comes from the PATH, and the page has to reach its end. --- tests/t0303-robustness.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 07f7c09..5097b87 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -208,11 +208,12 @@ test_expect_success 'a filter that cannot run answers one error page' ' test_expect_success 'a filter that exits without reading does not end cgit' ' { - echo "email-filter=exec:/usr/bin/true" && + echo "email-filter=exec:true" && cat robrc } >truerc && CGIT_CONFIG="$PWD/truerc" QUERY_STRING="url=rob/log/" cgit >tmp && - grep "^Status:" tmp + grep "^Status: 200" tmp && + grep "" tmp ' test_expect_success 'a commit encoding header is read without its newline' ' -- cgit