Skip to content

Commit c482df8

Browse files
committed
Fix place for round bracket and remove obsolete header
This was done in 3.2 previously, see commit 4efe324 . As everything was sanitized, the comment was removed.
1 parent b1f279f commit c482df8

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

testssl.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,6 @@ out() { printf -- "%b" "$1"; html_out "$(html_reserved "$1")"; }
532532
outln() { printf -- "%b" "$1\n"; html_out "$(html_reserved "$1")\n"; }
533533

534534

535-
#TODO: Still no shell injection safe but if just run it from the cmd line: that's fine
536-
537535
# Color print functions, see also https://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
538536
tm_liteblue() { [[ "$COLOR" -ge 2 ]] && ( "$COLORBLIND" && tm_out "\033[0;32m$1" || tm_out "\033[0;34m$1" ) || tm_out "$1"; tm_off; } # not yet used
539537
pr_liteblue() { tm_liteblue "$1"; [[ "$COLOR" -ge 2 ]] && ( "$COLORBLIND" && html_out "<span style=\"color:#00cd00;\">$(html_reserved "$1")</span>" || html_out "<span style=\"color:#0000ee;\">$(html_reserved "$1")</span>" ) || html_out "$(html_reserved "$1")"; }
@@ -2827,7 +2825,7 @@ emphasize_stuff_in_headers(){
28272825
if "$do_html"; then
28282826
if [[ $COLOR -ge 2 ]]; then
28292827
html_out "$(tm_out "$1" | sed -e 's/\&/\&amp;/g' \
2830-
-e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/"/\&quot;/g' -e "s/'/\&apos;/g" \
2828+
-e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/\"/\&quot;/g' -e "s/\'/\&apos;/g" \
28312829
-e "s/\([0-9]\)/${html_brown}\1${html_off}/g" \
28322830
-e "s/Unix/${html_yellow}Unix${html_off}/g" \
28332831
-e "s/Debian/${html_yellow}Debian${html_off}/g" \
@@ -2864,16 +2862,15 @@ emphasize_stuff_in_headers(){
28642862
-e "s/X-Rack-Cache/${html_yellow}X-Rack-Cache${html_off}/g" \
28652863
-e "s/X-Pingback/${html_yellow}X-Pingback${html_off}/g" \
28662864
-e "s/X-Permitted-Cross-Domain-Policies/${html_yellow}X-Permitted-Cross-Domain-Policies${html_off}/g" \
2867-
-e "s/X-AspNet-Version/${html_yellow}X-AspNet-Version${html_off}/g")" \
2865+
-e "s/X-AspNet-Version/${html_yellow}X-AspNet-Version${html_off}/g" \
28682866
-e "s/x-note/${html_yellow}x-note${html_off}/g" \
28692867
-e "s/X-Global-Transaction-ID/${html_yellow}X-Global-Transaction-ID${html_off}/g" \
28702868
-e "s/x-global-transaction-id/${html_yellow}x-global-transaction-id${html_off}/g" \
28712869
-e "s/Alt-Svc/${html_yellow}Alt-Svc${html_off}/g" \
2872-
-e "s/system-wsgw-management-loopback/${html_yellow}system-wsgw-management-loopback${html_off}/g"
2873-
#FIXME: this is double code. The pattern to emphasize would fit better into
2874-
# one function.
2875-
# Also we need another function like run_other_header as otherwise "Link" "Alt-Svc" will never be found.
2876-
# And: I matches case sensitive only which might not detect all banners. (sed ignorecase is not possible w/ BSD sed)
2870+
-e "s/system-wsgw-management-loopback/${html_yellow}system-wsgw-management-loopback${html_off}/g" \
2871+
)"
2872+
#FIXME: this is double code. The pattern to emphasize headers should be better in one single function.
2873+
+# And: It matches case sensitive headers only which won't detect all banners. (sed ignorecase is not a/v for OpenBSD sed)
28772874
else
28782875
html_out "$(html_reserved "$1")"
28792876
fi

0 commit comments

Comments
 (0)