From 732653ff944286345091db08e33649b3e3a49da4 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:57:10 -0700 Subject: Ask for a url through cgit_url everywhere --- tests/t0301-security.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/t0301-security.sh') diff --git a/tests/t0301-security.sh b/tests/t0301-security.sh index 3fc491f..c75c791 100755 --- a/tests/t0301-security.sh +++ b/tests/t0301-security.sh @@ -30,7 +30,7 @@ test_expect_success 'set up security fixtures' ' # tip, so a request for id=--output= could create or truncate any file # the server is able to write. test_expect_success 'log id=--output does not write a file' ' - cgit_query "url=foo/log&id=--output=$PWD/pwned" >tmp 2>&1 && + cgit_url "foo/log&id=--output=$PWD/pwned" >tmp 2>&1 && ! test -e pwned ' @@ -40,7 +40,7 @@ test_expect_success 'log id=--output is rejected as an invalid revision' ' test_expect_success 'a valid id= still renders the log' ' sha=$(git -C repos/foo rev-parse HEAD) && - cgit_query "url=foo/log&id=$sha" >tmp && + cgit_url "foo/log&id=$sha" >tmp && grep -i "commit 5" tmp ' @@ -97,7 +97,7 @@ test_expect_success 'root-readme without a filter is its own page, as written' ' # button and its selects carry no handlers at all. test_expect_success 'diff options submit through a button' ' sha=$(git -C repos/foo rev-parse HEAD) && - cgit_query "url=foo/commit&id=$sha" >tmp && + cgit_url "foo/commit&id=$sha" >tmp && grep "type=.submit. value=.reload." tmp && ! grep "onchange" tmp ' -- cgit