From 4317cbdb6b211c87055326f6e54b7f4f8c04fccf Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sat, 30 Dec 2017 00:10:25 +0100 Subject: [PATCH] Detect the issue alias_traversal --- sub_scripts/testing_process.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index 01ade8c..a36c3c9 100644 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -357,6 +357,11 @@ CHECK_URL () { fi 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" \ + && ECHO_FORMAT "Issue alias_traversal detected ! Please see here [...] to fix that.\n" "red" "bold" + # Remove the entries in /etc/hosts for the test domain sudo sed --in-place '/#package_check/d' /etc/hosts else