Fix Cross Site Scripting Issue (#497)

* Update eos.py

* ruff format

* ruff format
This commit is contained in:
Yunus AYDIN 2025-03-28 00:22:18 +03:00 committed by GitHub
parent 7734c9c32f
commit 2468efe604
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -1224,14 +1224,14 @@ class DataImportMixin:
# We jump back by 1 hour
# Repeat the value(s) (reuse value index)
for i in range(interval_steps_per_hour):
logger.debug(f"{i+1}: Repeat at {next_time} with index {value_index}")
logger.debug(f"{i + 1}: Repeat at {next_time} with index {value_index}")
timestamps_with_indices.append((next_time, value_index))
next_time = next_time.add(seconds=interval.total_seconds())
else:
# We jump forward by 1 hour
# Drop the value(s)
logger.debug(
f"{i+1}: Skip {interval_steps_per_hour} at {next_time} with index {value_index}"
f"{i + 1}: Skip {interval_steps_per_hour} at {next_time} with index {value_index}"
)
value_index += interval_steps_per_hour

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
import argparse
import html
import os
import subprocess
import sys
@ -129,8 +130,8 @@ 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))
)