Files
Hermes_rocket.chat_Plugin/tests
Bernd (Hermes) d2945e185b P1 FB-08: Path-Traversal-Sanitization + Response-Size-Cap in download_file
- Add _sanitize_file_path_component() — strips all chars except [a-zA-Z0-9._-]
- download_file() now sanitizes file_id and filename before URL construction
- URL-encode path components with urllib.parse.quote()
- Response size cap: read in 64KB chunks, stop at max_size (default 10MB)
- Reject downloads when sanitized file_id or filename is empty
- Add 10 new tests in test_p1_fb08_file_security.py (all green)
- No regressions: 578 archivar tests pass, 82 top-level tests pass
2026-07-29 06:09:28 +02:00
..