mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-04 07:45:27 +01:00 
			
		
		
		
	Handle HTML reserved characters in headers
So far I haven't seen any HTML reserved characters (&, <, >, ", ') in the strings processed by `emphasize_stuff_in_headers()`, so this PR may be unnecessary. However, this PR will ensure that any such characters will be properly escaped in the HTML output.
This commit is contained in:
		@@ -1926,7 +1926,9 @@ emphasize_stuff_in_headers(){
 | 
				
			|||||||
          -e "s/X-AspNet-Version/${yellow}X-AspNet-Version${off}/g"
 | 
					          -e "s/X-AspNet-Version/${yellow}X-AspNet-Version${off}/g"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     if "$do_html"; then
 | 
					     if "$do_html"; then
 | 
				
			||||||
          html_out "$(tm_out "$1" | sed -e "s/\([0-9]\)/${html_brown}\1${html_off}/g" \
 | 
					          html_out "$(tm_out "$1" | sed -e 's/\&/\&/g' \
 | 
				
			||||||
 | 
					               -e 's/</\</g' -e 's/>/\>/g' -e 's/"/\"/g' -e "s/'/\'/g" \
 | 
				
			||||||
 | 
					               -e "s/\([0-9]\)/${html_brown}\1${html_off}/g" \
 | 
				
			||||||
               -e "s/Debian/${html_yellow}\Debian${html_off}/g" \
 | 
					               -e "s/Debian/${html_yellow}\Debian${html_off}/g" \
 | 
				
			||||||
               -e "s/Win32/${html_yellow}\Win32${html_off}/g" \
 | 
					               -e "s/Win32/${html_yellow}\Win32${html_off}/g" \
 | 
				
			||||||
               -e "s/Win64/${html_yellow}\Win64${html_off}/g" \
 | 
					               -e "s/Win64/${html_yellow}\Win64${html_off}/g" \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user