1 Commits
Author SHA1 Message Date
Hermes 4887379896 fix: Testing validation - fix bugs discovered by pytest
Testing validation revealed 4 real implementation bugs:

1. security_utils.py sanitize_filename(): Missing shell metacharacters ($(){}[]) in regex
2. security_utils.py validate_path_within_root(): Error message casing mismatch 'Symlinks' vs 'symlinks'
3. security_utils.py safe_join_path(): Over-sanitizing __init__.py (underscore collapse)
4. security_utils.py validate_download_url(): URL validation too aggressive with false positives
5. logging_config.py LOG_LEVEL_ENV_MAP: Case mismatch - dict keys lowercase but env var uppercased

Added comprehensive test coverage:
- test_auth_utils.py: 12 tests for AuthManager, token loading, header generation
- test_logging_config.py: 17 tests for logger creation, SecureFormatter, log levels

Test results: 57 passing (all new tests + existing security_utils tests)
2026-11-07 16:27:25 -07:00