mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-10 10:40:57 +01:00
Correctly grab redirect url
This commit is contained in:
parent
d84279f571
commit
377f050ad7
@ -705,7 +705,7 @@ run_http_header() {
|
|||||||
out " $status_code$msg_thereafter"
|
out " $status_code$msg_thereafter"
|
||||||
case $status_code in
|
case $status_code in
|
||||||
301|302|307|308)
|
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\""
|
out ", redirecting to \"$redirect\""
|
||||||
if [[ $redirect != "https://"* ]]; then
|
if [[ $redirect != "https://"* ]]; then
|
||||||
pr_litered " -- Redirect to insecure URL (NOT ok)"
|
pr_litered " -- Redirect to insecure URL (NOT ok)"
|
||||||
|
Loading…
Reference in New Issue
Block a user