From c3269f19279d797d63a3a4d71458cab26c6caaf7 Mon Sep 17 00:00:00 2001 From: Dirk Date: Tue, 22 Dec 2015 20:31:52 +0100 Subject: [PATCH] - Fixes for #260 --- testssl.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/testssl.sh b/testssl.sh index 4bdf462..b098d87 100755 --- a/testssl.sh +++ b/testssl.sh @@ -646,11 +646,10 @@ run_http_header() { out " $status_code$msg_thereafter" case $status_code in 301|302|307|308) - out ", redirecting to \"$(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n')\"" - if [[ ( $redirect == https* ) || ( $redirect == /* ) ]]; then - # Ok - else - pr_litered " -- Redirect to insecure url (NOT ok)" + redirect=$(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n') + out ", redirecting to \"$redirect"\" + if [[ $redirect == "http://"* ]]; then + pr_litered " -- Redirect to insecure URL (NOT ok)" fi ;; 200) ;; @@ -5479,4 +5478,4 @@ fi exit $? -# $Id: testssl.sh,v 1.427 2015/12/11 12:13:21 dirkw Exp $ +# $Id: testssl.sh,v 1.428 2015/12/22 19:31:51 dirkw Exp $