@@ -123,6 +123,7 @@ trap "child_error" USR1
123123########### Internal definitions
124124#
125125declare -r VERSION="3.3dev"
126+ # shellcheck disable=SC2034
126127declare -r SWCONTACT="dirk aet testssl dot sh"
127128[[ "$VERSION" =~ dev|rc|beta ]] && \
128129 SWURL="https://testssl.sh/dev/" ||
@@ -2499,13 +2500,13 @@ service_detection() {
24992500 send_app_data "$plaintext"
25002501 if [[ $? -eq 0 ]]; then
25012502 receive_app_data true
2502- [[ $? -eq 0 ]] || > "$TMPFILE"
2503+ [[ $? -eq 0 ]] || : > "$TMPFILE"
25032504 else
2504- > "$TMPFILE"
2505+ : > "$TMPFILE"
25052506 fi
25062507 send_close_notify "$DETECTED_TLS_VERSION"
25072508 else
2508- > "$TMPFILE"
2509+ : > "$TMPFILE"
25092510 fi
25102511 else
25112512 # SNI is not standardized for !HTTPS but fortunately for other protocols s_client doesn't seem to care
@@ -2920,7 +2921,7 @@ run_hsts() {
29202921 fi
29212922 debugme echo "hsts_age_sec: $hsts_age_sec"
29222923 if ! is_number "$hsts_age_sec"; then
2923- pr_svrty_medium "misconfiguration: \'" $hsts_age_sec" \' is not a valid max-age specification"
2924+ pr_svrty_medium "misconfiguration: \'$hsts_age_sec\' is not a valid max-age specification"
29242925 fileout "${jsonID}_time" "MEDIUM" "misconfiguration, specified not a number for max-age"
29252926 set_grade_warning "HSTS max-age is misconfigured"
29262927 else
@@ -18372,7 +18373,7 @@ run_breach() {
1837218373 fileout "$jsonID" "WARN" "Test failed as HTTP request stalled and was terminated" "$cve" "$cwe"
1837318374 fi
1837418375 else
18375- for c in ${has_compression[@]}; do
18376+ for c in " ${has_compression[@]}" ; do
1837618377 if [[ $c =~ yes ]]; then
1837718378 detected_compression+="${c%:*} "
1837818379 fi
@@ -24486,7 +24487,7 @@ debug_globals() {
2448624487set_skip_tests() {
2448724488 local t
2448824489
24489- for t in ${SKIP_TESTS[@]} ; do
24490+ for t in " ${SKIP_TESTS[@]}" ; do
2449024491 t="do_${t}"
2449124492 # declare won't do it here --> local scope
2449224493 eval "$t"=false
0 commit comments