pdf-quiz-generator/frontend
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
..
public Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
src fix: the contact form's messages were readable by anyone 2026-09-12 22:37:28 +02:00
.dockerignore Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
docker-entrypoint.sh feat: Cap on its own host, hints per topic, and an objective is asked for 2026-09-12 06:24:23 +02:00
Dockerfile Remove coach modes and improve quiz audio 2026-05-10 01:24:06 +02:00
index.html Tag filtering, multi-category, bug fixes, image validation, docs 2026-04-04 22:48:26 +02:00
nginx.conf feat: Cap on its own host, hints per topic, and an objective is asked for 2026-09-12 06:24:23 +02:00
package-lock.json Remove coach modes and improve quiz audio 2026-05-10 01:24:06 +02:00
package.json Remove coach modes and improve quiz audio 2026-05-10 01:24:06 +02:00
vite.config.js Remove coach modes and improve quiz audio 2026-05-10 01:24:06 +02:00