diff --git a/.dev-tools/globalblacklist-testing.template b/.dev-tools/globalblacklist-testing.template index e09beeef3..a77a24fd8 100644 --- a/.dev-tools/globalblacklist-testing.template +++ b/.dev-tools/globalblacklist-testing.template @@ -139,7 +139,7 @@ map $http_user_agent $bad_bot { # TEST CASES # ********** - "~*(?:\b)ozilla(?:|\s|,|\.|\b|\/)" 3; + #"~*(?:\b)ozilla(?:|\s|,|\.|\b|\/)" 3; # START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ### diff --git a/.dev-tools/install-nginx-testing-of-changes.sh b/.dev-tools/install-nginx-testing-of-changes.sh index 00318ef44..a41706ab7 100644 --- a/.dev-tools/install-nginx-testing-of-changes.sh +++ b/.dev-tools/install-nginx-testing-of-changes.sh @@ -45,7 +45,7 @@ # Make sure we test latest generated globalblacklist-testing-version.conf # *********************************************************************** -printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy latest generated globalblacklist.conf file to test for any compile errors" "##############################################################################" +printf '\n%s\n%s\n%s\n\n' "##############################################################################" "Copy Test Unit of globalblacklist.conf file to test for any compile errors" "##############################################################################" sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf # ********************* diff --git a/.dev-tools/run-curl-tests-testing-of-changes.sh b/.dev-tools/run-curl-tests-testing-of-changes.sh index ab3749b6e..08ab02a44 100755 --- a/.dev-tools/run-curl-tests-testing-of-changes.sh +++ b/.dev-tools/run-curl-tests-testing-of-changes.sh @@ -246,14 +246,13 @@ run_curltest11 run_curltest12 () { truncate -s 0 ${_curltest12} -printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING FALSE POSITIVE CASES" "#########################" +printf '\n%s\n%s\n%s\n\n' "############################" "TESTING FALSE POSITIVE CASES" "############################" printf '%s%s\n\n' "Last Tested: " "$_now" >> "${_curltest12}" curl -A "Mozilla/5.0 (compatible; Googlebot-Image/Snutch\-/-2.1; +http://www.google.com/bot.html)" http://localhost:9000/index.php 2>> ${_curltest12} -if grep -i '(52)' ${_curltest12}; then +if grep -i 'Welcome' ${_curltest12}; then echo 'NO FALSE POSITIVE - TEST PASSED' else echo 'FALSE POSITIVE - TEST FAILED' - #exit 1 fi } run_curltest12 @@ -264,14 +263,13 @@ run_curltest12 run_curltest13 () { truncate -s 0 ${_curltest13} -printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING FALSE POSITIVE CASES" "#########################" +printf '\n%s\n%s\n%s\n\n' "############################" "TESTING FALSE POSITIVE CASES" "############################" printf '%s%s\n\n' "Last Tested: " "$_now" >> "${_curltest13}" curl -A "SnutchMozilla/5.0 (compatible; Googlebot-Image/SMutch\-/-2.1; +http://www.google.com/bot.html)" http://localhost:9000/index.php 2>> ${_curltest13} -if grep -i '(52)' ${_curltest13}; then +if grep -i 'Welcome' ${_curltest13}; then echo 'NO FALSE POSITIVE - TEST PASSED' else echo 'FALSE POSITIVE - TEST FAILED' - #exit 1 fi } run_curltest13 @@ -282,14 +280,13 @@ run_curltest13 run_curltest14 () { truncate -s 0 ${_curltest14} -printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING FALSE POSITIVE CASES" "#########################" +printf '\n%s\n%s\n%s\n\n' "############################" "TESTING FALSE POSITIVE CASES" "############################" printf '%s%s\n\n' "Last Tested: " "$_now" >> "${_curltest14}" curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" http://localhost:9000/index.php 2>> ${_curltest14} if grep -i 'Welcome' ${_curltest14}; then echo 'NO FALSE POSITIVE - TEST PASSED' else echo 'FALSE POSITIVE - TEST FAILED' - #exit 1 fi } run_curltest14 @@ -301,14 +298,13 @@ run_curltest14 run_curltest15 () { truncate -s 0 ${_curltest15} -printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING FALSE POSITIVE CASES" "#########################" +printf '\n%s\n%s\n%s\n\n' "############################" "TESTING FALSE POSITIVE CASES" "############################" printf '%s%s\n\n' "Last Tested: " "$_now" >> "${_curltest15}" curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" http://localhost:9000/index.php 2>> ${_curltest15} -if grep -i '(52)' ${_curltest15}; then - echo 'NO FALSE POSITIVE - TEST FAILED' +if grep -i 'Welcome' ${_curltest15}; then + echo 'NO FALSE POSITIVE - TEST PASSED' else - echo 'FALSE POSITIVE - TEST PASSED' - #exit 1 + echo 'FALSE POSITIVE - TEST FAILED' fi } run_curltest15