Increase HTTP request timeout to 120s for large file processing (up to 1GB PDFs)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-07 19:39:57 +00:00
parent 755ef8a2e5
commit 7fc2703d90
4 changed files with 13 additions and 5 deletions
+9 -2
View File
@@ -78,9 +78,16 @@ This document tracks security vulnerabilities found in DocuElevate and their rem
**Issue:** HTTP requests without timeout can hang indefinitely, leading to resource exhaustion and potential DoS.
**Remediation:**
- Added `http_request_timeout` configuration setting (default: 30 seconds)
- Added `http_request_timeout` configuration setting (default: 120 seconds)
- Timeout configured to handle large file operations (PDFs up to 1GB+)
- Applied `timeout=settings.http_request_timeout` to all `requests.get()`, `requests.post()`, and `requests.put()` calls
- Configurable via environment variable: `HTTP_REQUEST_TIMEOUT=30`
- Configurable via environment variable: `HTTP_REQUEST_TIMEOUT=120`
**Note:** The 120-second default timeout is appropriate for:
- Large PDF file uploads and downloads (up to 1GB)
- PDF conversion operations via Gotenberg
- Cloud storage uploads (Dropbox, OneDrive, Google Drive, Nextcloud, WebDAV)
- Document processing and OCR operations
### Low Severity Issues (Informational)