~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
security: add rate limiting to settings endpoints (#2021)
LearningCircuit1057e170f68e
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.pyindex e696c5e170..c434fa4d7e 100644--- a/src/local_deep_research/web/routes/settings_routes.py+++ b/src/local_deep_research/web/routes/settings_routes.py@@ -64,6 +64,7 @@ from ...database.encrypted_db import db_managerfrom ...utilities.db_utils import get_settings_managerfrom ...utilities.url_utils import normalize_urlfrom ..auth.decorators import login_required+from ..utils.rate_limiter import settings_limitfrom ...settings import SettingsManagerfrom ...settings.manager import get_typed_setting_value, parse_booleanfrom ..services.settings_service import (@@ -295,6 +296,7 @@ def settings_page():@settings_bp.route("/save_all_settings", methods=["POST"])@login_required+@settings_limitdef save_all_settings():"""Handle saving all settings at once from the unified settings page"""username = session.get("username")@@ -642,6 +644,7 @@ def save_all_settings():@settings_bp.route("/reset_to_defaults", methods=["POST"])@login_required+@settings_limitdef reset_to_defaults():"""Reset all settings to their default values"""username = session.get("username")@@ -672,6 +675,7 @@ def reset_to_defaults():@settings_bp.route("/save_settings", methods=["POST"])@login_required+@settings_limitdef save_settings():"""Save all settings from the form using POST method - fallback when JavaScript is disabled"""try:@@ -1034,6 +1038,7 @@ def api_delete_setting(key):@settings_bp.route("/api/import", methods=["POST"])@login_required+@settings_limitdef api_import_settings():"""Import settings from defaults file"""try:@@ -1924,6 +1929,7 @@ def inject_csrf_token():@settings_bp.route("/fix_corrupted_settings", methods=["POST"])@login_required+@settings_limitdef fix_corrupted_settings():"""Fix corrupted settings in the database"""username = session.get("username")diff --git a/src/local_deep_research/web/utils/rate_limiter.py b/src/local_deep_research/web/utils/rate_limiter.pyindex 14d4b42808..bcdecf76d8 100644--- a/src/local_deep_research/web/utils/rate_limiter.py+++ b/src/local_deep_research/web/utils/rate_limiter.py@@ -22,6 +22,8 @@ _config = load_server_config()DEFAULT_RATE_LIMIT = _config["rate_limit_default"]LOGIN_RATE_LIMIT = _config["rate_limit_login"]REGISTRATION_RATE_LIMIT = _config["rate_limit_registration"]+# Settings modification rate limit - prevent abuse of settings endpoints+SETTINGS_RATE_LIMIT = _config.get("rate_limit_settings", "30 per minute")def get_client_ip():@@ -74,3 +76,8 @@ registration_limit = limiter.shared_limit(REGISTRATION_RATE_LIMIT,scope="registration",)++settings_limit = limiter.shared_limit(+ SETTINGS_RATE_LIMIT,+ scope="settings",+)