Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: pass password to DownloadService in download_all_text endpoint

LearningCircuit38aafa1a0519
diff --git a/src/local_deep_research/research_library/routes/library_routes.py b/src/local_deep_research/research_library/routes/library_routes.py
index 41fd77de3e..f2236da527 100644
--- a/src/local_deep_research/research_library/routes/library_routes.py
+++ b/src/local_deep_research/research_library/routes/library_routes.py
@@ -643,9 +643,19 @@ def download_text_single(resource_id):
def download_all_text():
"""Download all undownloaded resources as text files."""
username = session.get("username")
+ # Capture Flask session ID to avoid scoping issues in nested function
+ flask_session_id = session.get("_id")
def generate():
- download_service = DownloadService(username)
+ # Get user password for database operations
+ user_password, _ = get_authenticated_user_password(
+ username, flask_session_id
+ )
+ if user_password is None:
+ logger.error(f"Could not get password for user {username}")
+ return
+
+ download_service = DownloadService(username, user_password)
# Get all undownloaded resources
with get_user_db_session(username) as session: