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