pdf-quiz-generator/backend/app
Daniel 18fa1913a4 fix: the contact form's messages were readable by anyone
`GET /api/contact/submissions` had no authentication. `require_admin` was
imported inside the function body and never used as a dependency, so the import
read as protection and was none: anyone who guessed the path could read every
sender's name, email address and message. `PUT .../read` was open the same way.

Both now depend on `require_admin`, with a test that a learner gets 403 and an
administrator gets the list. A row with a null timestamp no longer takes the
whole listing down with it — which is the only reason the hole showed up as a
500 rather than as data.

Also: the tutor's site switch lives in Redis, which the tests share with the
running site, so turning the tutor off in the interface turned a test red. The
test now sets the flag it depends on and puts it back.

And the tutor button is hidden until the server says it is allowed, rather than
shown and then withdrawn — on a site with it switched off that flicker reads as
a bug rather than a policy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
2026-09-12 22:37:28 +02:00
..
middleware Add comprehensive structured logging with Loki + Grafana 2026-04-11 02:53:54 +02:00
models feat: cards remember, render as prose, and are reachable from a question 2026-09-12 21:50:31 +02:00
routers fix: the contact form's messages were readable by anyone 2026-09-12 22:37:28 +02:00
schemas feat: an account may have no password, and may set one later 2026-09-12 17:39:29 +02:00
services feat: cards remember, render as prose, and are reachable from a question 2026-09-12 21:50:31 +02:00
tasks fix: thumbnails may be kept, the embedding model may not be changed here 2026-09-12 21:35:26 +02:00
utils feat: question folders, per-section notes, and two feedback paths 2026-09-12 18:37:43 +02:00
__init__.py Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
cli.py Fix CLI argument handling for all commands 2026-04-08 20:57:58 +02:00
config.py feat: rerank what a learner is shown, with Cohere through the proxy 2026-09-12 18:23:06 +02:00
database.py Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
logging_config.py Add comprehensive structured logging with Loki + Grafana 2026-04-11 02:53:54 +02:00
main.py feat: question folders, per-section notes, and two feedback paths 2026-09-12 18:37:43 +02:00