diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index e1b7b3a..5cc7507 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -117,6 +117,16 @@ test_expect_success 'a filesystem readme from a scanned repository is refused' ' grep "Ignoring readme in " err ' +# A colon with nothing after it names no ref, so the setting is a path on +# disk and has to wait on trust like any other. +test_expect_success 'a readme ending in a colon is refused like a path on disk' ' + echo "outside the repository" >"scan/outside:" && + echo "readme=../outside:" >scan/b.git/cgitrc && + CGIT_CONFIG="$PWD/gitcfgrc" QUERY_STRING="url=b.git/about/" cgit >tmp 2>err && + grep "Ignoring readme in " err && + ! grep "outside the repository" tmp +' + # A repository served as html runs its pages on the site's own origin, so # the switch waits on trust like the keys that place markup. The warning has # to name the repository, which it did not for a key read from git config. |
