Files
python-learning/exercises/02-engineering-2026/06-security-appsec/appsec.py
T
2026-12-02 16:58:44 +01:00

18 lines
482 B
Python

import re
from pathlib import Path
class PathTraversalError(ValueError):
"""Próba wyjścia poza dozwolony katalog bazowy."""
def safe_join(base_dir: Path, relative_path: str) -> Path:
raise NotImplementedError(
"Rozwiąż (base_dir / relative_path).resolve() i sprawdź is_relative_to(base_dir.resolve())"
)
def redact_secrets(log_line: str) -> str:
_ = re
raise NotImplementedError("Zamień wartości po Bearer , token= oraz password= na '***'")