Security fixes: use tojson filter, fix Tuple import, remove raw value exposure

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-07 22:38:58 +00:00
parent 54e93dcdf2
commit 4b4c208035
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ This module provides functionality to:
"""
import logging
from typing import Any, Dict, List, Optional
from typing import Any, Dict, List, Optional, Tuple
from sqlalchemy.orm import Session
from sqlalchemy.exc import SQLAlchemyError
@@ -290,7 +290,7 @@ def get_settings_by_category() -> Dict[str, List[str]]:
return categories
def validate_setting_value(key: str, value: str) -> tuple[bool, Optional[str]]:
def validate_setting_value(key: str, value: str) -> Tuple[bool, Optional[str]]:
"""
Validate a setting value based on its metadata.