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: Tighten gitleaks patterns and fix Firefox compatibility

LearningCircuitadb38143398a
diff --git a/.gitleaks.toml b/.gitleaks.toml
index 0287412533..4c803d97ba 100644
--- a/.gitleaks.toml
+++ b/.gitleaks.toml
@@ -117,8 +117,8 @@ regexes = [
# Allow comments that explain API key usage but don't contain actual keys
'''# API_KEY: OpenRouter API key''',
'''OPENROUTER_API_KEY''',
- # Allow CSRF token reading from DOM (not a secret exposure)
- '''const csrfToken = document\.querySelector''',
+ # Allow CSRF token reading from DOM meta tag (standard web CSRF protection pattern)
+ '''const csrfToken = document\.querySelector\(['"](meta\[name=)''',
# Allow test credentials used in CI/CD workflows
'''testpass123''',
'''perf-test-secret-key''',
@@ -152,7 +152,7 @@ regexes = [
'''hash\s*=\s*"sha256:[a-fA-F0-9]{64}"''',
'''content_hash\s*=\s*"sha256:[a-fA-F0-9]{64}"''',
# Allow CSRF token meta tag selectors (JavaScript, not actual secrets)
- '''csrf_token\s*=\s*document\.querySelector'''
+ '''csrf_token\s*=\s*document\.querySelector\(['"](meta\[name=)'''
]
# Target specific files for scanning
diff --git a/src/local_deep_research/web/static/js/pdf_upload_handler.js b/src/local_deep_research/web/static/js/pdf_upload_handler.js
index e33e901aa3..11731db370 100644
--- a/src/local_deep_research/web/static/js/pdf_upload_handler.js
+++ b/src/local_deep_research/web/static/js/pdf_upload_handler.js
@@ -486,7 +486,9 @@ class PDFUploadHandler {
`;
// Find the PDF hint item and add status div to it
- const pdfHintItem = document.querySelector('.ldr-hint-item:has(.ldr-pdf-upload-btn)');
+ // Use parentElement traversal instead of :has() for Firefox compatibility
+ const pdfBtn = document.querySelector('.ldr-pdf-upload-btn');
+ const pdfHintItem = pdfBtn?.closest('.ldr-hint-item');
if (pdfHintItem) {
statusDiv.style.cssText += `
margin-left: 0.5rem;