mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Remove CR in server banner
... which caused a problem in t/32_isHTML_valid.t. Also the test for an empty server banner was simplified
This commit is contained in:
parent
d298b41d2c
commit
fab67d0cca
@ -3129,16 +3129,18 @@ run_server_banner() {
|
|||||||
grep -ai '^Server' $HEADERFILE >$TMPFILE
|
grep -ai '^Server' $HEADERFILE >$TMPFILE
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
serverbanner=$(sed -e 's/^Server: //' -e 's/^server: //' $TMPFILE)
|
serverbanner=$(sed -e 's/^Server: //' -e 's/^server: //' $TMPFILE)
|
||||||
if [[ "$serverbanner" == $'\n' ]] || [[ "$serverbanner" == $'\r' ]] || [[ "$serverbanner" == $'\n\r' ]] || [[ -z "$serverbanner" ]]; then
|
serverbanner=${serverbanner//$'\r'}
|
||||||
|
serverbanner=${serverbanner//$'\n'}
|
||||||
|
if [[ -z "$serverbanner" ]]; then
|
||||||
outln "exists but empty string"
|
outln "exists but empty string"
|
||||||
fileout "$jsonID" "INFO" "Server banner is empty"
|
fileout "$jsonID" "INFO" "Server banner is empty"
|
||||||
else
|
else
|
||||||
emphasize_stuff_in_headers "$serverbanner"
|
emphasize_stuff_in_headers "$serverbanner"
|
||||||
fileout "$jsonID" "INFO" "$serverbanner"
|
fileout "$jsonID" "INFO" "$serverbanner"
|
||||||
if [[ "$serverbanner" == *Microsoft-IIS/6.* ]] && [[ $OSSL_VER == 1.0.2* ]]; then
|
if [[ "$serverbanner" == *Microsoft-IIS/6.* ]] && [[ $OSSL_VER == 1.0.2* ]]; then
|
||||||
prln_warning " It's recommended to run another test w/ OpenSSL 1.0.1 !"
|
prln_warning " It's recommended to run another test w/ OpenSSL >= 1.0.1 !"
|
||||||
# see https://github.com/PeterMosmans/openssl/issues/19#issuecomment-100897892
|
# see https://github.com/PeterMosmans/openssl/issues/19#issuecomment-100897892
|
||||||
fileout "${jsonID}" "WARN" "IIS6_openssl_mismatch: Recommended to rerun this test w/ OpenSSL 1.0.1. See https://github.com/PeterMosmans/openssl/issues/19#issuecomment-100897892"
|
fileout "${jsonID}" "WARN" "IIS6_openssl_mismatch: Recommended to rerun this test w/ OpenSSL >= 1.0.1. See https://github.com/PeterMosmans/openssl/issues/19#issuecomment-100897892"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# mozilla.github.io/server-side-tls/ssl-config-generator/
|
# mozilla.github.io/server-side-tls/ssl-config-generator/
|
||||||
|
Loading…
Reference in New Issue
Block a user