diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index 51630ba..80dda1f 100644 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -380,8 +380,16 @@ CHECK_URL () { done # Detect the issue alias_traversal, https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md - curl --location --insecure --silent $check_domain$check_path../html/index.nginx-debian.html \ - | grep "title" | grep --quiet "Welcome to nginx on Debian" \ + + # Create a file to get for alias_traversal + echo " +alias_traversal test +

alias_traversal test

+If you see this page, you have failed the test for alias_traversal issue." \ + | sudo tee /var/lib/lxc/$lxc_name/rootfs/var/www/html/alias_traversal.html > /dev/null + + curl --location --insecure --silent $check_domain$check_path../html/alias_traversal.html \ + | grep "title" | grep --quiet "alias_traversal test" \ && ECHO_FORMAT "Issue alias_traversal detected ! Please see here https://github.com/YunoHost/example_ynh/pull/45 to fix that.\n" "red" "bold" && RESULT_alias_traversal=1 # Remove the entries in /etc/hosts for the test domain