diff --git a/CHANGELOG.md b/CHANGELOG.md index b70b1f3..855842b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ## Change Log +### Security fixes in 3.2.x + +* Security fix: HTML-escape URLs in the HTML report to prevent stored XSS from a server-controlled `Location:` header (#3090) + ### Features implemented / improvements in 3.2 * Rating (SSL Labs), as of 3.2.2 version 2009r diff --git a/CREDITS.md b/CREDITS.md index 1667f5d..6ac1b0e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -68,6 +68,9 @@ Full contribution, see git log. * Christian Dresen - Dockerfile +* Eric Gu + - HTML report XSS fix (escape server-controlled URLs, #3090) + * enxio - support for TN3270/telnet STARTTLS diff --git a/testssl.sh b/testssl.sh index 0ffb4ea..eab9719 100755 --- a/testssl.sh +++ b/testssl.sh @@ -739,8 +739,8 @@ tmln_fixme() { tmln_warning "Fixme: $1"; } pr_fixme() { pr_warning "Fixme: $1"; } prln_fixme() { prln_warning "Fixme: $1"; } -pr_url() { tm_out "$1"; html_out "$1"; } -pr_boldurl() { tm_bold "$1"; html_out "$1"; } +pr_url() { tm_out "$1"; html_out "$(html_reserved "$1")"; } +pr_boldurl() { tm_bold "$1"; html_out "$(html_reserved "$1")"; } ### color switcher (see e.g. https://linuxtidbits.wordpress.com/2008/08/11/output-color-on-bash-scripts/ ### https://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html