18 lines
482 B
Python
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 '***'")
|