mirror of
https://github.com/HKUDS/LightRAG.git
synced 2026-01-06 11:51:00 +00:00
- Add sanitize_filename() function to validate and clean uploaded filenames - Remove path separators, traversal sequences, and control characters - Verify final paths stay within input directory using Path.resolve() - Return HTTP 400 errors for unsafe filenames - Prevents directory traversal attacks like ../../../etc/passwd