From 48461e11fea2448feeb9cc1688a0e4dd527cecc6 Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Sun, 11 Oct 2026 07:46:45 +0200 Subject: [PATCH 01/14] fix: import db in timer review and idle-response handlers Rollback paths referenced db without importing it, which failed flake8 F821 and would raise NameError at runtime. --- app/routes/api_v1_time_entries.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/routes/api_v1_time_entries.py b/app/routes/api_v1_time_entries.py index f8d1d9ee..66b42609 100644 --- a/app/routes/api_v1_time_entries.py +++ b/app/routes/api_v1_time_entries.py @@ -446,6 +446,7 @@ def timer_review(): """ from datetime import datetime + from app import db from app.models import Settings from app.models.time_entry import local_now from app.utils.db import safe_commit @@ -510,6 +511,7 @@ def timer_idle_response(): token the client was shown, and stale answers return ``{"already_resolved": true}`` so callers dismiss instead of acting. """ + from app import db from app.services.time_tracking_service import TimeTrackingService data = request.get_json(silent=True) or {} From 7c04420d1aff397253a290dae967c54632fd693a Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Sun, 11 Oct 2026 07:49:18 +0200 Subject: [PATCH 02/14] fix: add CSP nonces to remaining inline scripts Unblocked test_inline_scripts_carry_a_nonce so the strict CSP policy can stay enforceable. --- app/templates/quotes/template_form.html | 2 +- app/templates/timer/timer_page.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/quotes/template_form.html b/app/templates/quotes/template_form.html index 1f513bf4..73950bb5 100644 --- a/app/templates/quotes/template_form.html +++ b/app/templates/quotes/template_form.html @@ -118,7 +118,7 @@

{% endblock %} {% block scripts %} - -