Refactor/reuse #36

Merged
gnilebein merged 2 commits from refactor/reuse into main 2026-11-08 22:59:20 +01:00
2 Commits
Author SHA1 Message Date
gnilebeinandClaude Opus 5.5 3e44ded107 Share repeated controller and service code
CI / Deploy / deploy (push) Skipped
CI / Deploy / test (push) Successful in 53s
- AppController: joinUrl(), adminUrlFor(), setPollInterval() and protect()
  instead of copies in Admin-, Home-, Participate- and EmbedController.
- PollMailer::sendSafely() replaces two try/catch blocks around mail sending.
- Slide::optionIds() replaces five identical array_map() calls.
- PollStateService: one pollPayload() for presenter and embed; the vote
  action passes the already loaded slide instead of loading it again.
- ResultsService::forSlide() takes the answer/comment limit and the rating
  flag, so ReportService no longer queries answers, comments and the scale
  distribution twice and the export loads the slides only once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:50:56 +01:00
gnilebeinandClaude Opus 5.5 ad537b9b34 Hash client IPs for rate limits with a keyed HMAC
A plain sha256 of an IPv4 address can be reversed by trying all addresses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:50:56 +01:00