CRITICAL FIXES: - Fixed SQL injection vulnerability in document deletion endpoint - Changed PostgreSQL-style (%s) to SQLite-style (?) placeholders - Updated JSON operator from metadata->>'filename' to json_extract() - Affected lines: server.py:666, 679 - Fixed CORS security risk (allow_origins=["*"]) - Restricted to configurable whitelist via ALLOWED_ORIGINS env var - Default: localhost:5173,8051 for development - Production: Set to specific domains only - Added rate limiting to prevent DoS attacks - Implemented slowapi for per-IP rate limiting - Chat endpoint: 20 requests/minute per IP - Prevents resource exhaustion Security impact: CRITICAL → SECURE Files: mcp_server/server.py, .env.example |
||
|---|---|---|
| .. | ||
| tools | ||
| __init__.py | ||
| auth.py | ||
| server.py | ||