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.

docs: clarify that auth DB stores no passwords — prevent misguided fixes (#2149)

LearningCircuitaa407304896b
diff --git a/src/local_deep_research/database/encrypted_db.py b/src/local_deep_research/database/encrypted_db.py
index bd9f6d0e0b..3ad2b84d6c 100644
--- a/src/local_deep_research/database/encrypted_db.py
+++ b/src/local_deep_research/database/encrypted_db.py
@@ -500,7 +500,12 @@ class DatabaseManager:
def change_password(
self, username: str, old_password: str, new_password: str
) -> bool:
- """Change the encryption password for a user's database."""
+ """Change the encryption password for a user's database.
+
+ This rekeys the SQLCipher database — no separate auth-DB
+ password-hash update is needed because passwords are never
+ stored. Login verification is done by attempting decryption.
+ """
if not self.has_encryption:
logger.warning(
"Cannot change password - SQLCipher not available (databases are unencrypted)"
diff --git a/src/local_deep_research/database/models/auth.py b/src/local_deep_research/database/models/auth.py
index 44fc7217bb..d54e784102 100644
--- a/src/local_deep_research/database/models/auth.py
+++ b/src/local_deep_research/database/models/auth.py
@@ -17,7 +17,16 @@ from .base import Base
class User(Base):
"""
User model - stored in a central auth database.
- Passwords are NEVER stored - they are used to decrypt individual user databases.
+
+ IMPORTANT — Authentication Architecture:
+ Passwords are NEVER stored here (no password_hash column, no set_password
+ method). Authentication works by attempting to decrypt the user's
+ per-user SQLCipher database with the supplied password. If decryption
+ succeeds the password is correct; if it fails the password is wrong.
+
+ On password change only the SQLCipher database is rekeyed — there is
+ nothing to update in this model. Do NOT add password storage here
+ without reworking the entire auth flow.
"""
__tablename__ = "users"
diff --git a/src/local_deep_research/web/auth/routes.py b/src/local_deep_research/web/auth/routes.py
index 69f9101aef..b9004c1dbc 100644
--- a/src/local_deep_research/web/auth/routes.py
+++ b/src/local_deep_research/web/auth/routes.py
@@ -496,7 +496,11 @@ def change_password():
)
if success:
- # Clear session to force re-login with new password
+ # The rekey is the ONLY step needed. The auth database stores no
+ # password hash — login works by attempting to decrypt the user's
+ # SQLCipher database. Do NOT add an auth-DB password-hash update
+ # here; it would fail (User model has no set_password method) and
+ # is architecturally unnecessary.
session.clear()
logger.info(f"Password changed for user {username}")