Final code review fixes: move import, remove empty tests, add production warning

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-09 11:53:43 +00:00
parent 8550799bf8
commit 494ef135d5
3 changed files with 13 additions and 64 deletions
+1 -1
View File
@@ -1,5 +1,6 @@
import re
import socket
import html
from typing import Dict, Tuple, Union, Optional
# Error codes for structured error handling
@@ -101,7 +102,6 @@ def validate_domain_config(domain_data: Dict) -> Dict[str, Union[bool, str]]:
if len(domain_data["description"]) > 500:
errors["description"] = "Description is too long (max 500 characters)"
# Security: Use html.escape to prevent XSS
import html
escaped = html.escape(domain_data["description"])
if escaped != domain_data["description"]:
errors["description"] = "Description contains potentially unsafe HTML content"