Commit Graph

18 Commits

Author SHA1 Message Date
nmemmert 889baf23ca Fix server sanitizer to allow books/recommended placements and linkUrl/linkLabel fields; v1.1.38
- Add 'books' and 'recommended' to the placement whitelist in sanitizeCustomLinks
- Allow items with no url when placement is books/recommended (they use amazonUrl)
- Preserve linkUrl and linkLabel through sanitizeCustomBlocks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-26 08:23:59 -04:00
nmemmert c56e468115 Revert "Add student birthday tracking with celebration banners and admin notification; v1.1.31"
This reverts commit c0a79b9ed0.
2026-08-10 08:43:53 -04:00
nmemmert c0a79b9ed0 Add student birthday tracking with celebration banners and admin notification; v1.1.31
- Admin can set birthday (month/day) per student in Study Users panel
- Summer birthdays (Jun–Aug) prompt admin to set an alternate school-year date
- 🎂 badge on student card header during birthday week
- Dismissible happy birthday banner shown to student on their study hub
- Admin receives email notification on the celebration day, once per year

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-10 08:42:52 -04:00
nmemmert 1d43875e5a Fix 11 bugs: restore crash, draft leak, email failures, memory leaks
Critical fixes:
- sanitizeLoadedHitStats/VisitorStats: restore full state shape so a
  snapshot restore no longer crashes hit-counting middleware (missing
  byPathReal, byPathBot, byDayReal, byDayBot, botReasons, ipHashIndex)
- /questions/share/🆔 read state.questions only, not draft questions
- inbound-email: validate date with Number.isFinite before toISOString
- study-reminders: wrap each send in try/catch so one failure doesn't
  block remaining users; persist sent-markers after each success

Security:
- getClientIp: use req.ip (trust-proxy-resolved) instead of raw
  x-forwarded-for header to prevent IP spoofing
- env-snapshot.env: delete immediately after backup tar stream ends
  so secrets don't linger on disk between exports

Correctness / UX:
- contact form: email failures no longer 500 the user after the
  submission is already saved; log and fall through instead
- study-account profile: cap data URI avatar at 6 MB
- admin enrollment PATCH: validate slug against study catalog
- signup: return 503 at MAX_STUDY_USERS instead of silently dropping
  oldest accounts

Memory leaks:
- contactHits, downloadHits Maps: prune stale entries at 5000 entries
- resendEmailSubmissionIndex: trim to 2000 entries (oldest first)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-16 07:48:54 -04:00
nmemmert 2e406af471 Add ALLOW_INSECURE_COOKIES env flag for HTTP access in production
Browsers drop Secure cookies on plain-http origins, so logging into the
admin over a LAN/VPN IP (e.g. during server migration, before TLS is in
front) silently failed every authenticated request. Setting
ALLOW_INSECURE_COOKIES=true omits the Secure flag; default behavior in
production is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 12:49:37 -04:00
nmemmert b34a78f874 fix agian 2026-06-03 15:49:22 -04:00
nmemmert 68f6212e9b cool stuff 2026-06-03 14:14:25 -04:00
nmemmert a2c4924191 email templates 2026-06-03 13:14:08 -04:00
nmemmert b187b19f18 feat: homepage newsletter, Q&A callout, episodes page redesign, SEO/sitemap, asset tagging
- Fix "Invalid Date" on student account page (memberSince guard)
- Fix study community author showing full email instead of username
- Add newsletter sign-up section to homepage (between PRISM and Current Series)
- Add newsletter opt-in nudge to study enrollment flow
- Redesign episodes page: latest episode featured card + per-episode Spotify embed
- Add SEO description field to episodes page (visually hidden, admin-editable)
- Expand default sitemap paths to include /about, /contact, /episodes, /resources, /study, /study/titus, /study/colossians
- Add featured Q&A callout section to homepage
- Add Q&A callout to study hub footer
- Tag both untagged image assets in Asset Manager
2026-06-03 10:56:55 -04:00
nmemmert 5b448aef0f stuff 2026-06-02 14:02:00 -04:00
nmemmert 33ac2fb5d0 Fix homepage external link placement and publish sanitization 2026-06-01 13:31:26 -04:00
nmemmert ffa860d5bc Preserve releasedAt timestamps during admin content sanitize 2026-05-21 12:44:13 -04:00
nmemmert affd903f40 Make homepage study card admin-editable with NEW tag controls 2026-05-12 12:47:13 -04:00
nmemmert 583a9b7b66 Implement email tab redesign, archive support, manual Q&A creation, URL linking, and question admin tools
- Add dedicated Emails tab with inbox/archive views and two-pane layout
- Implement archive/unarchive for contact submissions with persisted state
- Add manual question creation endpoint and admin form (non-contact origin)
- Implement URL auto-linking in Q&A answers with safe rendering
- Add question admin tools: search, filter (All/Pending/Approved/Answered/Unanswered), pagination
- Expand admin panel widths to reduce cramping
- Restore and enhance Asset Manager table layout
- Update email reply template with fixed from-address and HTML support
2026-05-07 09:43:16 -04:00
nmemmert bc3d906e64 Add per-download Amazon button settings for current and archived downloads 2026-05-07 07:49:02 -04:00
nmemmert 79eb72635e Fix download link styling and raise download description limits 2026-05-04 15:08:27 -04:00
nmemmert 1551599305 Beta: TOTP 2FA, admin asset manager, resource page redesign, rate limiting, and security hardening 2026-05-04 13:56:04 -04:00
nmemmert 7f56060d6b Beta: admin assets, resource download forms, and resource page redesign 2026-04-30 15:47:10 -04:00