mirror of
				https://github.com/Akkudoktor-EOS/EOS.git
				synced 2025-11-04 00:36:21 +00:00 
			
		
		
		
	Fix Cross Site Scripting Issue (#497)
This commit is contained in:
		
				
					committed by
					
						
						Dominique Lasserre
					
				
			
			
				
	
			
			
			
						parent
						
							8bdad48823
						
					
				
				
					commit
					87ebbf0f08
				
			@@ -1,3 +1,5 @@
 | 
			
		||||
import html
 | 
			
		||||
 | 
			
		||||
ERROR_PAGE_TEMPLATE = """
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
@@ -86,6 +88,6 @@ def create_error_page(
 | 
			
		||||
    return (
 | 
			
		||||
        ERROR_PAGE_TEMPLATE.replace("STATUS_CODE", status_code)
 | 
			
		||||
        .replace("ERROR_TITLE", error_title)
 | 
			
		||||
        .replace("ERROR_MESSAGE", error_message)
 | 
			
		||||
        .replace("ERROR_DETAILS", error_details)
 | 
			
		||||
        .replace("ERROR_MESSAGE", html.escape(error_message))
 | 
			
		||||
        .replace("ERROR_DETAILS", html.escape(error_details))
 | 
			
		||||
    )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user