From 377f050ad791460ea794b20383ec4202f0965a46 Mon Sep 17 00:00:00 2001 From: Frank Breedijk Date: Mon, 21 Dec 2015 15:52:55 +0100 Subject: [PATCH] Correctly grab redirect url --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index decfc92..5ae86fc 100755 --- a/testssl.sh +++ b/testssl.sh @@ -705,7 +705,7 @@ run_http_header() { out " $status_code$msg_thereafter" case $status_code in 301|302|307|308) - redirect = $(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n') + redirect=`$(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n')` out ", redirecting to \"$redirect\"" if [[ $redirect != "https://"* ]]; then pr_litered " -- Redirect to insecure URL (NOT ok)"