@@ -17325,19 +17325,19 @@ run_breach() {
17325
17325
17326
17326
# Final verdict (if not happened preemptively before). We reuse $detected_compression here
17327
17327
detected_compression=""
17328
- if [[ ${has_compression[@ ]} =~ warn ]]; then
17328
+ if [[ ${has_compression[* ]} =~ warn ]]; then
17329
17329
# warn_empty / warn_stalled
17330
- if [[ ${has_compression[@ ]} =~ warn_empty ]]; then
17331
- pr_warning "At least 1/4 checks failed (HTTP header request was empty, debug: ${has_compression[@ ]}"
17332
- out ", debug: ${has_compression[@ ]})"
17333
- fileout "$jsonID" "WARN" "Test failed as HTTP response was empty, debug: ${has_compression[@ ]}" "$cve" "$cwe"
17330
+ if [[ ${has_compression[* ]} =~ warn_empty ]]; then
17331
+ pr_warning "At least 1/4 checks failed (HTTP header request was empty, debug: ${has_compression[* ]}"
17332
+ out ", debug: ${has_compression[* ]})"
17333
+ fileout "$jsonID" "WARN" "Test failed as HTTP response was empty, debug: ${has_compression[* ]}" "$cve" "$cwe"
17334
17334
else # warn_stalled
17335
17335
pr_warning "At least 1/4 checks failed (HTTP header request stalled and was terminated"
17336
- out ", debug: ${has_compression[@ ]})"
17336
+ out ", debug: ${has_compression[* ]})"
17337
17337
fileout "$jsonID" "WARN" "Test failed as HTTP request stalled and was terminated" "$cve" "$cwe"
17338
17338
fi
17339
17339
else
17340
- for c in ${has_compression[@]}; do
17340
+ for c in " ${has_compression[@]}" ; do
17341
17341
if [[ $c =~ yes ]]; then
17342
17342
detected_compression+="${c%:*} "
17343
17343
fi
@@ -17348,7 +17348,7 @@ run_breach() {
17348
17348
outln "${spaces}${when_makesense}"
17349
17349
fileout "$jsonID" "MEDIUM" "potentially VULNERABLE, $detected_compression HTTP compression detected $disclaimer" "$cve" "$cwe" "$hint"
17350
17350
fi
17351
- debugme outln "${spaces}has_compression: ${has_compression[@ ]}"
17351
+ debugme outln "${spaces}has_compression: ${has_compression[* ]}"
17352
17352
;;
17353
17353
esac
17354
17354
@@ -18743,7 +18743,7 @@ run_winshock() {
18743
18743
# Check whether there are any TLS extension which should not be available under <= Windows 2012 R2
18744
18744
for tls_ext in $TLS_EXTENSIONS; do
18745
18745
# We use the whole array, got to be careful when the array becomes bigger (unintended match)
18746
- if [[ ${forbidden_tls_ext[@ ]} =~ $tls_ext ]]; then
18746
+ if [[ ${forbidden_tls_ext[* ]} =~ $tls_ext ]]; then
18747
18747
pr_svrty_best "not vulnerable (OK)"; outln " - TLS extension $tls_ext detected"
18748
18748
fileout "$jsonID" "OK" "not vulnerable - TLS extension $tls_ext detected" "$cve" "$cwe"
18749
18749
return 0
@@ -23134,7 +23134,7 @@ debug_globals() {
23134
23134
set_skip_tests() {
23135
23135
local t
23136
23136
23137
- for t in ${SKIP_TESTS[@]} ; do
23137
+ for t in " ${SKIP_TESTS[@]}" ; do
23138
23138
t="do_${t}"
23139
23139
# declare won't do it here --> local scope
23140
23140
eval "$t"=false
@@ -23318,7 +23318,7 @@ parse_cmd_line() {
23318
23318
# then we need to make sure we catch --ids-friendly. Normally we do not,
23319
23319
# see #1717. The following statement makes sure. In the do-while + case-esac
23320
23320
# loop it will be execute again, but it does not hurt
23321
- if [[ "${CMDLINE_ARRAY[@ ]}" =~ --ids-friendly ]]; then
23321
+ if [[ "${CMDLINE_ARRAY[* ]}" =~ --ids-friendly ]]; then
23322
23322
OFFENSIVE=false
23323
23323
fi
23324
23324
do_vulnerabilities=true
0 commit comments