- 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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| document_routes.py | ||
| graph_routes.py | ||
| ollama_api.py | ||
| query_routes.py | ||