Skip to content

Commit 4efe324

Browse files
committed
Fix round bracket and remove obsolete comment
1 parent d7da22d commit 4efe324

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

testssl.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,6 @@ tmln_out() { printf -- "%b" "$1\n"; }
582582
out() { printf -- "%b" "$1"; html_out "$(html_reserved "$1")"; }
583583
outln() { printf -- "%b" "$1\n"; html_out "$(html_reserved "$1")\n"; }
584584

585-
#TODO: Still no shell injection safe but if just run it from the cmd line: that's fine
586-
587585
# Color print functions, see also https://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
588586
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
589587
pr_liteblue() { tm_liteblue "$1"; [[ "$COLOR" -ge 2 ]] && { "$COLORBLIND" && html_out "<span style=\"color:#008817;\">$(html_reserved "$1")</span>" || html_out "<span style=\"color:#0000ee;\">$(html_reserved "$1")</span>"; } || html_out "$(html_reserved "$1")"; }
@@ -3143,7 +3141,7 @@ emphasize_stuff_in_headers(){
31433141
if "$do_html"; then
31443142
if [[ $COLOR -ge 2 ]]; then
31453143
html_out "$(tm_out "$1" | sed -e 's/\&/\&amp;/g' \
3146-
-e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/"/\&quot;/g' -e "s/'/\&apos;/g" \
3144+
-e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/\"/\&quot;/g' -e "s/\'/\&apos;/g" \
31473145
-e "s/\([0-9]\)/${html_brown}\1${html_off}/g" \
31483146
-e "s/Unix/${html_yellow}Unix${html_off}/g" \
31493147
-e "s/Debian/${html_yellow}Debian${html_off}/g" \
@@ -3182,16 +3180,16 @@ emphasize_stuff_in_headers(){
31823180
-e "s/X-DNS-Prefetch-Control/${html_yellow}X-DNS-Prefetch-Control${html_off}/g" \
31833181
-e "s/X-Pingback/${html_yellow}X-Pingback${html_off}/g" \
31843182
-e "s/X-Permitted-Cross-Domain-Policies/${html_yellow}X-Permitted-Cross-Domain-Policies${html_off}/g" \
3185-
-e "s/X-AspNet-Version/${html_yellow}X-AspNet-Version${html_off}/g")" \
3183+
-e "s/X-AspNet-Version/${html_yellow}X-AspNet-Version${html_off}/g" \
31863184
-e "s/X-AspNetMvc-Version/${html_yellow}X-AspNetMvc-Version${html_off}/g" \
31873185
-e "s/x-note/${html_yellow}x-note${html_off}/g" \
31883186
-e "s/X-Global-Transaction-ID/${html_yellow}X-Global-Transaction-ID${html_off}/g" \
31893187
-e "s/x-global-transaction-id/${html_yellow}x-global-transaction-id${html_off}/g" \
31903188
-e "s/Alt-Svc/${html_yellow}Alt-Svc${html_off}/g" \
3191-
-e "s/system-wsgw-management-loopback/${html_yellow}system-wsgw-management-loopback${html_off}/g"
3192-
#FIXME: this is double code. The pattern to emphasize would fit better into one function.
3193-
# Also we need another function like run_other_header as otherwise "Link" "Alt-Svc" will never be found.
3194-
# And: I matches case sensitive only which might not detect all banners. (sed ignorecase is not possible w/ BSD sed)
3189+
-e "s/system-wsgw-management-loopback/${html_yellow}system-wsgw-management-loopback${html_off}/g" \
3190+
)"
3191+
#FIXME: this is double code. The pattern to emphasize headers should be better in one single function
3192+
# And: It matches case sensitive headers only which won't detect all banners. (sed ignorecase is not a/v for OpenBSD sed)
31953193
else
31963194
html_out "$(html_reserved "$1")"
31973195
fi

0 commit comments

Comments
 (0)