From f356ebbc13491a98c397920097494958efb042dd Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 10 Jun 2018 18:51:58 +0200 Subject: git-receiver: fixed segfault on pre-receive hook if a [repo:*] section was defined in blogc-git-receiver.ini, but was not providing a symlink value, that would result in a segfault. --- tests/blogc-git-receiver/check_pre_receive.sh.in | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'tests/blogc-git-receiver') diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index 2a9aa91..41daaf3 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -94,8 +94,6 @@ cat > "${TEMP}/payload.txt" < "${TEMP}/blogc-git-receiver.ini" <&1 | tee "${TEMP}/output.txt" grep "echo lol" "${TEMP}/output.txt" &> /dev/null +[[ -h htdocs ]] +[[ "$(cat htdocs/foo.txt)" == "lol" ]] + +cat >> "${TEMP}/blogc-git-receiver.ini" <&1 | tee "${TEMP}/output.txt" +grep "echo lol" "${TEMP}/output.txt" &> /dev/null + +[[ -h htdocs ]] +[[ "$(cat htdocs/foo.txt)" == "lol" ]] + +cat >> "${TEMP}/blogc-git-receiver.ini" <&1 | tee "${TEMP}/output.txt" +grep "echo lol" "${TEMP}/output.txt" &> /dev/null + [[ -h "${TEMP}/chunda" ]] [[ "$(cat "${TEMP}/chunda/foo.txt")" == "lol" ]] -- cgit v1.2.3-18-g5258